Свойство | Type | Description | |
---|---|---|---|
$formatInfo | The DateTimeFormatInfo, containing culture specific patterns and names. | ||
$methods | array | A list of methods, to be used by the token function calls. | |
$tokens | array | A list of tokens and their function call. |
Méthode | Description | |
---|---|---|
__construct ( $formatInfo = null ) : |
Initialize a new DateFormat. | |
format ( $time, $pattern = 'F', $charset = 'UTF-8' ) : string | Format a date according to the pattern. |
Méthode | Description | |
---|---|---|
getAMPM ( $date, $pattern = 'a' ) : string | Get the AM/PM designator, 12 noon is PM, 12 midnight is AM. | |
getDay ( $date, $pattern = 'd' ) : string | Get the day of the month. | |
getDayInMonth ( $date, $pattern = 'FF' ) : integer | Get day in the month. | |
getDayInWeek ( $date, $pattern = 'EEEE' ) : string | Get the day of the week. | |
getDayInYear ( $date, $pattern = 'D' ) : integer | Get the day in the year, e.g. [1-366] | |
getEra ( $date, $pattern = 'G' ) : string | Get the era. i.e. in gregorian, year > 0 is AD, else BC. | |
getFunctionName ( $token ) : mixed | For a particular token, get the corresponding function to call. | |
getHour12 ( $date, $pattern = 'h' ) : string | Get the hours in 12 hour format. | |
getHour24 ( $date, $pattern = 'H' ) : string | Get the hours in 24 hour format, i.e. [0-23]. | |
getHourInAMPM ( $date, $pattern = 'K' ) : integer | Get the hours in AM/PM format, e.g [1-12] | |
getHourInDay ( $date, $pattern = 'k' ) : integer | Get the hours [1-24]. | |
getMinutes ( $date, $pattern = 'm' ) : string | Get the minutes. | |
getMonth ( $date, $pattern = 'M' ) : string | Get the month. | |
getPattern ( $pattern ) : string | Get the pattern from DateTimeFormatInfo or some predefined patterns. | |
getSeconds ( $date, $pattern = 's' ) : string | Get the seconds. | |
getTimeZone ( $date, $pattern = 'z' ) : string | Get the timezone from the server machine. | |
getTokens ( $pattern ) : array | Tokenize the pattern. The tokens are delimited by group of similar characters, e.g. 'aabb' will form 2 tokens of 'aa' and 'bb'. | |
getWeekInMonth ( $date, $pattern = 'W' ) : integer | Get week in the month. | |
getWeekInYear ( $date, $pattern = 'w' ) : integer | Get the week in the year. | |
getYear ( $date, $pattern = 'yyyy' ) : string | Get the year. |
public __construct ( $formatInfo = null ) : |
||
Résultat | instance |
protected getDayInMonth ( $date, $pattern = 'FF' ) : integer | ||
Résultat | integer | day in month |
protected getDayInWeek ( $date, $pattern = 'EEEE' ) : string | ||
Résultat | string | day of the week. |
protected getDayInYear ( $date, $pattern = 'D' ) : integer | ||
Résultat | integer | hours in AM/PM format. |
protected getFunctionName ( $token ) : mixed | ||
Résultat | mixed | the function if good token, null otherwise. |
protected getHourInAMPM ( $date, $pattern = 'K' ) : integer | ||
Résultat | integer | hours in AM/PM format. |
protected getHourInDay ( $date, $pattern = 'k' ) : integer | ||
Résultat | integer | hours [1-24] |
protected getMinutes ( $date, $pattern = 'm' ) : string | ||
Résultat | string | minutes. |
protected getPattern ( $pattern ) : string | ||
Résultat | string | a pattern. |
protected getSeconds ( $date, $pattern = 's' ) : string | ||
Résultat | string | seconds |
protected getTimeZone ( $date, $pattern = 'z' ) : string | ||
Résultat | string | time zone |
protected getWeekInMonth ( $date, $pattern = 'W' ) : integer | ||
Résultat | integer | week in month |
protected getWeekInYear ( $date, $pattern = 'w' ) : integer | ||
Résultat | integer | week in year |
protected DateTimeFormatInfo,Prado\I18N\core $formatInfo | ||
Résultat |
protected array $methods | ||
Résultat | array |
protected array $tokens | ||
Résultat | array |