We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Helper class to deal with datetime values.
Formats a detetime value to a string.
Definition: public function Format($date, $format_id)
public function Format($date, $format_id)
Returns: string Formatted string
string
Parameters:
\DateTime|array|int $date Time value (see time)
\DateTime|array|int $date
int $format_id Format identifier (one of the DateTimeFormta::DT_* constants)
int $format_id
Returns all known DateTime patterns. These are the basic ones referred to by the DF_* constants plus the following combinations (separated by space):
Definition: public function KnownDateTimePatterns()
public function KnownDateTimePatterns()
Returns: array Array of format strings
array
Converts a string to a unix timestamp. Tries all KnownDateTimePatterns() and uses the best match. Known Bugs:
Definition: public function StringToTime($str)
public function StringToTime($str)
Returns: int|false The timestamp or FALSE on error
int|false
string $str