public static function formatDate($from, $to = null) { $par = JComponentHelper::getParams('com_djclassifieds'); if ($par->get('date_format_type', 0)) { return DJClassifiedsTheme::dateFormatFromTo($from, $to); } else { if ($par->get('date_persian', 0)) { return mds_date($par->get('date_format', 'Y-m-d H:i:s'), $from, 1); } else { return date($par->get('date_format', 'Y-m-d H:i:s'), $from); } } }
function mgetdate($timestamp = "") { if ($timestamp == "") { $timestamp = mktime(); } return array(0 => $timestamp, "seconds" => mds_date("s", $timestamp), "minutes" => mds_date("i", $timestamp), "hours" => mds_date("G", $timestamp), "mday" => mds_date("j", $timestamp), "wday" => mds_date("w", $timestamp), "mon" => mds_date("n", $timestamp), "year" => mds_date("Y", $timestamp), "yday" => days_of_year(mds_date("m", $timestamp), mds_date("d", $timestamp), mds_date("Y", $timestamp)), "weekday" => mds_date("l", $timestamp), "month" => mds_date("F", $timestamp)); }
public static function formatDate($from, $to = null, $date_format = 0) { $par = JComponentHelper::getParams('com_djclassifieds'); if ($from == '2145913200') { return JText::_('COM_DJCLASSIFIEDS_NEVER_EXPIRE'); } else { if ($date_format) { return DJClassifiedsTheme::dateFormatFromTo($from, $to); } else { if ($par->get('date_persian', 0)) { return mds_date($par->get('date_format', 'Y-m-d H:i:s'), $from, 1); } else { return date($par->get('date_format', 'Y-m-d H:i:s'), $from); } } } }