메소드 | 설명 | |
---|---|---|
__construct ( $convert = null, $jalali = null, $timezone = null ) | jDateTime::Constructor | |
checkdate ( $month, $day, $year, $jalali = null ) : boolean | jDateTime::Checkdate | |
convertFormatToFormat ( string $jalaliFormat, string $georgianFormat, string $timeString, null | DateTimeZone | string $timezone = null ) : string | Convert a formatted string from Georgian Calendar to Jalali Calendar. | |
date ( $format, $stamp = false, $convert = null, $jalali = null, $timezone = null ) : string | jDateTime::Date | |
gDate ( $format, $stamp = false, $timezone = null ) : string | jDateTime::gDate | |
getdate ( $timestamp = null ) : An | jDateTime::getdate | |
mktime ( $hour, $minute, $second, $month, $day, $year, $jalali = null, $timezone = null ) : integer | jDateTime::Mktime | |
strftime ( $format, $stamp = false, $convert = null, $jalali = null, $timezone = null ) : string | jDateTime::Strftime | |
toGregorian ( $j_y, $j_m, $j_d ) | Jalali to Gregorian Conversion Copyright (C) 2000 Roozbeh Pournader and Mohammad Toossi | |
toJalali ( $g_y, $g_m, $g_d ) | Gregorian to Jalali Conversion Copyright (C) 2000 Roozbeh Pournader and Mohammad Toossi |
메소드 | 설명 | |
---|---|---|
convertNumbers ( $matches ) | Converts latin numbers to farsi script | |
div ( $a, $b ) | Division | |
filterArray ( $needle, $heystack, $always = [] ) | Filters out an array | |
getDayNames ( $day, $shorten = false, $len = 1, $numeric = false ) | Returns correct names for week days | |
getMonthNames ( $month, $shorten = false, $len = 3 ) | Returns correct names for months | |
substr ( $str, $start, $len ) | Substring helper |
public __construct ( $convert = null, $jalali = null, $timezone = null ) | ||
$convert | bool Converts numbers to Farsi | |
$jalali | bool Converts date to Jalali | |
$timezone | string Timezone string |
public static checkdate ( $month, $day, $year, $jalali = null ) : boolean | ||
$month | int The month is between 1 and 12 inclusive. | |
$day | int The day is within the allowed number of days for the given month. | |
$year | int The year is between 1 and 32767 inclusive. | |
$jalali | bool (Optional) pass false if you want to input gregorian time | |
리턴 | boolean |
public static convertFormatToFormat ( string $jalaliFormat, string $georgianFormat, string $timeString, null | DateTimeZone | string $timezone = null ) : string | ||
$jalaliFormat | string | Return format. Same as static::date(...) |
$georgianFormat | string | The format of $timeString. See php.net/date |
$timeString | string | The time itself, formatted as $georgianFormat |
$timezone | null | DateTimeZone | string | The timezone. Same as static::date(...) |
리턴 | string |
public static date ( $format, $stamp = false, $convert = null, $jalali = null, $timezone = null ) : string | ||
$format | string Acceps format string based on: php.net/date | |
$stamp | int Unix Timestamp (Epoch Time) | |
$convert | bool (Optional) forces convert action. pass null to use system default | |
$jalali | bool (Optional) forces jalali conversion. pass null to use system default | |
$timezone | string (Optional) forces a different timezone. pass null to use system default | |
리턴 | string | Formatted input |
public static getdate ( $timestamp = null ) : An | ||
$timestamp | int The timestamp that whould convert to date information array, if NULL passed, current timestamp will be processed. | |
리턴 | An | associative array of information related to the timestamp. For see elements of the returned associative array see {@link http://php.net/manual/en/function.getdate.php#refsect1-function.getdate-returnvalues}. |
public static mktime ( $hour, $minute, $second, $month, $day, $year, $jalali = null, $timezone = null ) : integer | ||
$hour | int Hour based on 24 hour system | |
$minute | int Minutes | |
$second | int Seconds | |
$month | int Month Number | |
$day | int Day Number | |
$year | int Four-digit Year number eg. 1390 | |
$jalali | bool (Optional) pass false if you want to input gregorian time | |
$timezone | string (Optional) acceps an optional timezone if you want one | |
리턴 | integer | Unix Timestamp (Epoch Time) |
public static strftime ( $format, $stamp = false, $convert = null, $jalali = null, $timezone = null ) : string | ||
$format | string Acceps format string based on: php.net/date | |
$stamp | int Unix Timestamp (Epoch Time) | |
$convert | bool (Optional) forces convert action. pass null to use system default | |
$jalali | bool (Optional) forces jalali conversion. pass null to use system default | |
$timezone | string (Optional) forces a different timezone. pass null to use system default | |
리턴 | string | Formatted input |
public static toGregorian ( $j_y, $j_m, $j_d ) |
public static toJalali ( $g_y, $g_m, $g_d ) |