Short and long date formats
date_format_trunc = "%m-%d"
date_format_short = "%Y-%m-%d"
date_format_long = "%B %e, %Y"
datetime_format_short = "%Y-%m-%d %I:%M %p"
datetime_format_long = "%B %e, %Y - %I:%M %p"- %a - abbreviated weekday name according to the current locale
- %A - full weekday name according to the current locale
- %b - abbreviated month name according to the current locale
- %B - full month name according to the current locale
- %c - preferred date and time representation for the current locale asmecher wrote:classes/submission/sectionEditor/SectionEditorAction.inc.php
require_once('smarty/plugins/modifier.date_format.php');$this->register_modifier('date_format', array(&$this, 'dateFormat')); /**
* Override the built-in smarty date_format modifier if tje locale
* is in array @inArray.
*/
function dateFormat($date, $format = '%b %e, %Y', $default_date = '', $locale = null, $inArray = array('fa_IR')) {
if (!isset($locale)) $locale = Locale::getLocale();
if (!in_array($locale, $inArray))
return smarty_modifier_date_format($date, $format, $default_date);
import('jalali.Jalali');
$jcal = new Jalali();
return $jcal->dt_format($date, $format);
}
require_once('shared.make_timestamp.php')asmecher wrote: http://pkp.sfu.ca/support/forum/viewtopic.php?f=28&t=3538. Thanks for contributing, Mahmoud!
Return to OCS Conference Support and Discussion
Users browsing this forum: No registered users and 0 guests