Date
Date Parser
- Full name:
\SimplePie\Parse\Date
Properties
date
Input data
day
List of days, calendar day name => ordinal day number in the week
month
List of months, calendar month name => calendar month number
timezone
List of timezones, abbreviation => offset from UTC
day_pcre
Cached PCRE for Date::$day
month_pcre
Cached PCRE for Date::$month
built_in
Array of user-added callback methods
user
Array of user-added callback methods
Methods
__construct
Create new Date object, and set self::day_pcre, self::month_pcre, and self::built_in
get
Get the object
- This method is static.
parse
Parse a date
Parameters:
Parameter | Type | Description |
---|---|---|
$date |
string | Date to parse |
Return Value:
Timestamp corresponding to date string, or false on failure
add_callback
Add a callback method to parse a date
Parameters:
Parameter | Type | Description |
---|---|---|
$callback |
callable |
date_w3cdtf
Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as well as allowing any of upper or lower case "T", horizontal tabs, or spaces to be used as the time separator (including more than one))
Parameters:
Parameter | Type | Description |
---|---|---|
$date |
mixed |
Return Value:
Timestamp
remove_rfc2822_comments
Remove RFC822 comments
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
mixed |
Return Value:
Comment stripped string
date_rfc2822
Parse RFC2822's date format
Parameters:
Parameter | Type | Description |
---|---|---|
$date |
mixed |
Return Value:
Timestamp
date_rfc850
Parse RFC850's date format
Parameters:
Parameter | Type | Description |
---|---|---|
$date |
mixed |
Return Value:
Timestamp
date_asctime
Parse C99's asctime()'s date format
Parameters:
Parameter | Type | Description |
---|---|---|
$date |
mixed |
Return Value:
Timestamp
date_strtotime
Parse dates using strtotime()
Parameters:
Parameter | Type | Description |
---|---|---|
$date |
mixed |
Return Value:
Timestamp
Automatically generated on 2025-03-18