Online PHP Function(s){ #Test PHP functions online!; }


Date and Time

All functions with Date and or Time are here

checkdate Checks the validity of the date formed by the arguments. A date is considered valid if each parameter is properly defined.
date Returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given
date_add Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object
date_create Returns new DateTime object
date_create_from_format Returns new DateTime object formatted according to the specified format
date_date_set Sets the date
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 Returns the difference between two DateTime objects
date_format Returns date formatted according to given format
date_get_last_errors date_get_last_errors — Returns the warnings and errors
date_interval_create_from_date_string Sets up a DateInterval from the relative parts of the string
date_interval_format Formats the interval
date_isodate_set Sets the ISO date
date_modify Alters the timestamp
date_offset_get Returns the timezone offset
date_parse Returns associative array with detailed info about given date
date_parse_from_format Get info about given date formatted according to the specified format
date_sub Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
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_sun_info Returns an array with information about sunset/sunrise and twilight begin/end
date_timestamp_get Gets the Unix timestamp
date_timestamp_set Sets the date and time based on an Unix timestamp
date_timezone_get Return time zone relative to given DateTime
date_timezone_set Sets the time zone for the DateTime object
date_time_set Sets the time
getdate Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given.
gmdate Identical to the date() function except that the time returned is Greenwich Mean Time (GMT).
gmmktime Identical to mktime() except the passed parameters represents a GMT date. gmmktime() internally uses mktime() so only times valid in derived local time can be used.
gmstrftime Format a GMT/UTC time/date according to locale settings
idate Format a local time/date as integer
localeconv Get numeric formatting information
localtime The localtime() function returns an array identical to that of the structure returned by the C function ca
microtime Return current Unix timestamp with microseconds
mktime Returns the Unix timestamp corresponding to the arguments given. This timestamp is a long integer containing the number of seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time specified.
nl_langinfo nl_langinfo() is used to access individual elements of the locale categories. Unlike localeconv(), which returns all of the elements, nl_langinfo() allows you to select any specific element.
setlocale setlocale — Set locale information
strftime Format a local time/date according to locale settings
strptime strptime() returns an array with the date parsed, or FALSE on error.
strtotime Parse about any English textual datetime description into a Unix timestamp
time Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
timezone_identifiers_list Returns numerically index array with all timezone identifiers
timezone_location_get Returns location information for a timezone
timezone_name_from_abbr Returns the timezone name from abbreviation
timezone_name_get Returns the name of the timezone Report a bug
timezone_offset_get Returns the timezone offset from GMT
timezone_open Creates new DateTimeZone object
timezone_transitions_get Returns all transitions for the timezone
timezone_version_get Gets the version of the timezonedb
time_nanosleep Delay for a number of seconds and nanoseconds

      © 2022 | Disclaimer |       PHP versions: 8.0.0, 7.4.13, 7.4.7, 7.4.0, 7.3.25, 7.3.19, 7.3.12, 7.3.5, 7.2.31, 7.2.25, 7.2.18, 7.2.4, 7.1.33, 7.1.29, 7.1.0, 7.0.14, 7.0.5, 7.0.4, 7.0.3, 7.0.2, 7.0.1, 5.6.29, 5.6.20, 5.6.19, 5.6.18, 5.6.17, 5.6.2, 5.5.34, 5.5.33, 5.5.32, 5.5.31, 5.5.18, 5.5.5, 5.5.0.a6, 5.5.0.a.5, 5.5.0.a.2, 5.4.34, 5.4.21, 5.4.13, 5.4.12, 5.4.11, 5.4.10, 5.4.9, 5.4.8, 5.4.7, 5.4.6, 5.4.5, 5.4.4, 5.4.3, 5.4.2, 5.4.1, 5.4.0, 5.3.29, 5.3.27, 5.3.23, 5.3.22, 5.3.21, 5.3.20, 5.3.19, 5.3.18, 5.3.17, 5.3.16, 5.3.15, 5.3.14, 5.3.13, 5.3.12, 5.3.11, 5.3.10, 5.3.2, 5.3.1, 5.3.0, 5.2.17, 5.2.16, 5.1.6, 5.1.5, 5.0.5, 5.0.4, 4.4.9