Preconfigured arrays

Both translated and untranslated values are available. The date_week_days_ordered() function will shift an array of week day names so it starts with the site's first day of the week, otherwise the weekday names start with Sunday as the first value, the expected order for many php and sql functions.

Miscellaneous date manipulation functions

Pre-defined constants and functions that will handle pre-1970 and post-2038 dates in both PHP 4 and PHP 5, in any OS. Dates can be converted from one type to another and date parts can be extracted from any date type.

Date calculation and navigation

date_diff() will find the time difference between any two days, measured in seconds, minutes, hours, days, months, weeks, or years.

Date regex and format helpers

Pre-defined constants, an array of date format strings and their equivalent regex strings.

DATE_REGEX_LOOSE is a very loose regex that will pull date parts out of an ISO date with or without separators, using either 'T' or a space to separate date and time, and with or without time.

date_format_date() is similar to format_date(), except it takes a date object instead of a timestamp as the first parameter.