Name

date_parse_from_format

Synopsis

array date_parse_from_format(string format, string time)

Parses time into an associative array representing a date. The string time is given in the format specified by format, using the same character codes as described in date(). The returned array contains the following entries:

year

Year

month

Month

day

Day of the month

hour

Hours

minute

Minutes

second

Seconds

fraction

Fractions of seconds

warning_count

Number of warnings that occurred during parsing

warnings

An array of warnings that occurred during parsing

error_count

Number of errors that occurred during parsing

errors

An array of errors that occurred during parsing

is_localtime

True if the time represents a time in the current default time zone

zone_type

The type of time zone zone represents

zone

The time zone the time is in

is_dst

True if the time represents a time in Daylight Savings Time

Get Programming PHP, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.