How to use an abbreviated month with Zend_Date and locale formatting

602 Views Asked by At

I'm trying to set a long date format with an abbreviated month that uses the locale of the user. Here's what I have now.

//getDateTimeObject('field') grabs a Zend_Date object of the field
$creationDate = $this->getDateTimeObject('objectCreated');
$creationDate->get(Zend_Date::DATE_LONG)

That produces the appropriate dates. For en_US, "September 27, 2012". For en_GB, "27 September 2012". The problem is I need it to use the abbreviated month: en_US "Sept 27, 2012" and en_GB "27 Sept 2012".

How can I respect the locale and use an abbreviated month?

1

There are 1 best solutions below

1
akond On BEST ANSWER
echo $creationDate->get(Zend_Date::DATE_MEDIUM);