zend-frameworklocalezend-date

How to use an abbreviated month with Zend_Date and locale formatting


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?


Solution

  • echo $creationDate->get(Zend_Date::DATE_MEDIUM);