Skip to content

Commit

Permalink
Merge pull request #12 from sallar/develop
Browse files Browse the repository at this point in the history
Applied changes.
  • Loading branch information
sallar committed Jul 26, 2013
2 parents 5223ff1 + 26e88fc commit 74e2059
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jdatetime.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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",
Expand All @@ -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);
}

/**
Expand Down Expand Up @@ -448,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;
Expand Down

0 comments on commit 74e2059

Please sign in to comment.