Date/Time Functions
Table of Contents
- checkdate — Validate a Gregorian date
- date_add — Alias of DateTime::add
- date_create_from_format — Alias of DateTime::createFromFormat
- date_create_immutable_from_format — Alias of DateTimeImmutable::createFromFormat
- date_create_immutable — Alias of DateTimeImmutable::__construct
- date_create — Alias of DateTime::__construct
- date_date_set — Alias of DateTime::setDate
- date_default_timezone_get — Gets the default timezone used by all date/time functions in a script
- date_default_timezone_set — Sets the default timezone used by all date/time functions in a script
- date_diff — Alias of DateTime::diff
- date_format — Alias of DateTime::format
- date_get_last_errors — Alias of DateTime::getLastErrors
- date_interval_create_from_date_string — Alias of DateInterval::createFromDateString
- date_interval_format — Alias of DateInterval::format
- date_isodate_set — Alias of DateTime::setISODate
- date_modify — Alias of DateTime::modify
- date_offset_get — Alias of DateTime::getOffset
- date_parse_from_format — Get info about given date formatted according to the specified format
- date_parse — Returns associative array with detailed info about given date
- date_sub — Alias of DateTime::sub
- date_sun_info — Returns an array with information about sunset/sunrise and twilight begin/end
- date_sunrise — Returns time of sunrise for a given day and location
- date_sunset — Returns time of sunset for a given day and location
- date_time_set — Alias of DateTime::setTime
- date_timestamp_get — Alias of DateTime::getTimestamp
- date_timestamp_set — Alias of DateTime::setTimestamp
- date_timezone_get — Alias of DateTime::getTimezone
- date_timezone_set — Alias of DateTime::setTimezone
- date — Format a local time/date
- getdate — Get date/time information
- gettimeofday — Get current time
- gmdate — Format a GMT/UTC date/time
- gmmktime — Get Unix timestamp for a GMT date
- gmstrftime — Format a GMT/UTC time/date according to locale settings
- idate — Format a local time/date as integer
- localtime — Get the local time
- microtime — Return current Unix timestamp with microseconds
- mktime — Get Unix timestamp for a date
- strftime — Format a local time/date according to locale settings
- strptime — Parse a time/date generated with strftime
- strtotime — Parse about any English textual datetime description into a Unix timestamp
- time — Return current Unix timestamp
- timezone_abbreviations_list — Alias of DateTimeZone::listAbbreviations
- timezone_identifiers_list — Alias of DateTimeZone::listIdentifiers
- timezone_location_get — Alias of DateTimeZone::getLocation
- timezone_name_from_abbr — Returns the timezone name from abbreviation
- timezone_name_get — Alias of DateTimeZone::getName
- timezone_offset_get — Alias of DateTimeZone::getOffset
- timezone_open — Alias of DateTimeZone::__construct
- timezone_transitions_get — Alias of DateTimeZone::getTransitions
- timezone_version_get — Gets the version of the timezonedb
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-ref.datetime.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.