In order to get smarty to work in email templates you need to enable it editing the settings file civicrm.settings.php
, as per CiviCRM documentation:
if (!defined('CIVICRM_MAIL_SMARTY')) {
define( 'CIVICRM_MAIL_SMARTY', 1 ); // default is: define( 'CIVICRM_MAIL_SMARTY', 0 );
}
With smarty enabled, the following snippet should output the desired date format:
{$smarty.now|date_format} // Output: Jan 12, 2016
{$smarty.now|date_format:"%B %e, %Y"} // Output: January 12, 2016
As Eli says and references Coleman post is a very good example, simply pasting his code into an existing extension, or creating one for your needs, will work.