magento display formatted date


/ Published in: PHP
Save to your folder(s)

Grabbed from parsing magento's source code


Copy this code and paste it in your HTML
  1. $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
  2. var_dump(Mage::app()->getLocale()->date($DATE-TO-FORMAT)->toString($format));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.