sfDateFormat
in package
Table of Contents
Methods
- __construct() : mixed
- format() : string
- Format a date/time value.
- parse() : int|false
- Parse a date string.
Methods
__construct()
public
__construct([string|sfCultureInfo|null $cultureOrFormatInfo = null ]) : mixed
Parameters
- $cultureOrFormatInfo : string|sfCultureInfo|null = null
format()
Format a date/time value.
public
format(mixed $value[, string $pattern = 'd' ][, string $charset = 'UTF-8' ]) : string
Parameters
- $value : mixed
-
Date value (timestamp, string, or DateTime)
- $pattern : string = 'd'
-
Pattern string (Symfony 1.x ICU-style or named)
- $charset : string = 'UTF-8'
-
Character set
Return values
stringparse()
Parse a date string.
public
parse(string $value[, string $pattern = 'd' ]) : int|false
Parameters
- $value : string
-
Date string
- $pattern : string = 'd'
-
Pattern
Return values
int|false —Timestamp or false