Jump to: navigation, search

PHP Date Time Functions

From w3cyberlearnings
# Function Description
1 checkdate Validate a Gregorian date
2 date_add Alias of DateTime::add
3 date_create_from_format Alias of DateTime::createFromFormat
4 date_create Alias of DateTime::__construct
5 date_date_set Alias of DateTime::setDate
6 date_default_timezone_get Gets the default timezone used by all date/time functions in a script
7 date_default_timezone_set Sets the default timezone used by all date/time functions in a script
8 date_diff Alias of DateTime::diff
9 date_format Alias of DateTime::format
10 date_get_last_errors Alias of DateTime::getLastErrors
11 date_interval_create_from_date_string Alias of DateInterval::createFromDateString
12 date_interval_format Alias of DateInterval::format
13 date_isodate_set Alias of DateTime::setISODate
14 date_modify Alias of DateTime::modify
15 date_offset_get Alias of DateTime::getOffset
16 date_parse_from_format Get info about given date formatted according to the specified format
17 date_parse Returns associative array with detailed info about given date
18 date_sub Alias of DateTime::sub
19 date_sun_info Returns an array with information about sunset/sunrise and twilight begin/end
20 date_sunrise Returns time of sunrise for a given day and location
21 date_sunset Returns time of sunset for a given day and location
22 date_time_set Alias of DateTime::setTime
23 date_timestamp_get Alias of DateTime::getTimestamp
24 date_timestamp_set Alias of DateTime::setTimestamp
25 date_timezone_get Alias of DateTime::getTimezone
26 date_timezone_set Alias of DateTime::setTimezone
27 date Format a local time/date
28 getdate Get date/time information
29 gettimeofday Get current time
30 gmdate Format a GMT/UTC date/time
31 gmmktime Get Unix timestamp for a GMT date
32 gmstrftime Format a GMT/UTC time/date according to locale settings
33 idate Format a local time/date as integer
34 localtime Get the local time
35 microtime Return current Unix timestamp with microseconds
36 mktime Get Unix timestamp for a date
37 strftime Format a local time/date according to locale settings
38 strptime Parse a time/date generated with strftime
39 strtotime Parse about any English textual datetime description into a Unix timestamp
40 time Return current Unix timestamp
41 timezone_abbreviations_list Alias of DateTimeZone::listAbbreviations
42 timezone_identifiers_list Alias of DateTimeZone::listIdentifiers
43 timezone_location_get Alias of DateTimeZone::getLocation
44 timezone_name_from_abbr Returns the timezone name from abbreviation
45 timezone_name_get Alias of DateTimeZone::getName
46 timezone_offset_get Alias of DateTimeZone::getOffset
47 timezone_open Alias of DateTimeZone::__construct
48 timezone_transitions_get Alias of DateTimeZone::getTransitions
49 timezone_version_get Gets the version of the timezonedb

Related Links

Navigation
Web
SQL
MISC
References