我正在尝试使用使用用户区域设置的缩写月份设置长日期格式。 这就是我现在所拥有的。
//getDateTimeObject('field') grabs a Zend_Date object of the field
$creationDate = $this->getDateTimeObject('objectCreated');
$creationDate->get(Zend_Date::DATE_LONG)
这将产生适当的日期。 对于en_US,"2012 年 9 月 27 日"。 en_GB为"2012年9月27日"。 问题是我需要它使用缩写月份:en_US"Sept 27, 2012"和en_GB"27 Sept 2012"。
如何尊重区域设置并使用缩写月份?
echo $creationDate->get(Zend_Date::DATE_MEDIUM);