From 82b5e94fb7f63088c136b50821c16246e9e57533 Mon Sep 17 00:00:00 2001 From: Sallar Kaboli Date: Thu, 28 Mar 2013 21:52:57 +0430 Subject: [PATCH 1/2] Fixed strftime's arguments order bug. --- jdatetime.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jdatetime.class.php b/jdatetime.class.php index 646ec41..7275cfb 100644 --- a/jdatetime.class.php +++ b/jdatetime.class.php @@ -39,7 +39,7 @@ * @license http://opensource.org/licenses/mit-license.php The MIT License * @link https://github.com/sallar/jDateTime * @see DateTime - * @version 2.1.5 + * @version 2.1.6 */ class jDateTime { @@ -276,11 +276,12 @@ public static function gDate($format, $stamp = false, $timezone = null) * @author Omid Pilevar * @param $format string Acceps format string based on: php.net/date * @param $stamp int Unix Timestamp (Epoch Time) + * @param $convert bool (Optional) forces convert action. pass null to use system default * @param $jalali bool (Optional) forces jalali conversion. pass null to use system default * @param $timezone string (Optional) forces a different timezone. pass null to use system default * @return string Formatted input */ - public static function strftime($format, $stamp = false, $jalali = null, $timezone = null) + public static function strftime($format, $stamp = false, $convert = null, $jalali = null, $timezone = null) { $str_format_code = array( "%a", "%A", "%d", "%e", "%j", "%u", "%w", @@ -306,7 +307,7 @@ public static function strftime($format, $stamp = false, $jalali = null, $timezo $format = str_replace($str_format_code, $date_format_code, $format); //Convert to date - return self::date($format, $stamp, $jalali, $timezone); + return self::date($format, $stamp, $convert, $jalali, $timezone); } /** From 26e88fcd93dfe59197adb140b28ec0b331374820 Mon Sep 17 00:00:00 2001 From: Sallar Kaboli Date: Fri, 26 Jul 2013 21:11:57 +0430 Subject: [PATCH 2/2] Fixed the fifth month name with the more formal equivalent. --- jdatetime.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdatetime.class.php b/jdatetime.class.php index 7275cfb..d661ce7 100644 --- a/jdatetime.class.php +++ b/jdatetime.class.php @@ -449,7 +449,7 @@ private static function getMonthNames($month, $shorten = false, $len = 3) case '2': $ret = 'اردیبهشت'; break; case '3': $ret = 'خرداد'; break; case '4': $ret = 'تیر'; break; - case '5': $ret = 'امرداد'; break; + case '5': $ret = 'مرداد'; break; case '6': $ret = 'شهریور'; break; case '7': $ret = 'مهر'; break; case '8': $ret = 'آبان'; break;