Php date and time functions

Source: Internet
Author: User
Tags sunrise time
PHP extension date and time related functions Daquan checkdate-verify a greaguri date

Date_add-alias DateTime: add

Date_create_from_format-alias DateTime: createFromFormat

Date_create_immutable_from_format-alias DateTimeImmutable: createFromFormat

Date_create_immutable-alias DateTimeImmutable ::__ construct

Date_create-alias DateTime ::__ construct

Date_date_set-alias DateTime: setDate

Date_default_timezone_get-gets the default time zone used by all the datetime functions in a script.

Date_default_timezone_set-sets the default time zone used for all date and time functions in a script.

Date_diff-alias DateTime: diff

Date_format-alias DateTime: format

Date_get_last_errors-alias DateTime: getLastErrors

Date_interval_create_from_date_string-alias DateInterval: createFromDateString

Date_interval_format-alias DateInterval: format

Date_isodate_set-alias DateTime: setISODate

Date_modify-alias DateTime: modify

Date_offset_get-alias 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 DateTime: sub

Date_sun_info-Returns an array with information about sunset/sunrise and twilight begin/end

Date_sunrise-return the sunrise time of the given date and location

Date_sunset-return the sunset time of the given date and location

Date_time_set-alias DateTime: setTime

Date_timestamp_get-alias DateTime: getTimestamp

Date_timestamp_set-alias DateTime: setTimestamp

Date_timezone_get-alias DateTime: getTimezone

Date_timezone_set-alias 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-obtain the UNIX timestamp of the GMT Date

Gmstrftime-format GMT/UTC time/date based on region settings

Idate-format the local time and date as an integer

Localtime-get local time

Microtime-returns the current Unix timestamp and number of microseconds

Mktime-obtain the Unix timestamp of a date

Strftime-format local time/date based on region settings

Strptime-parse the date/time generated by strftime

Strtotime-parses the date and time descriptions of any English text into Unix timestamps

Time-returns the current Unix timestamp

Timezone_abbreviations_list-alias DateTimeZone: listAbbreviations

Timezone_identifiers_list-alias DateTimeZone: listIdentifiers

Timezone_location_get-alias DateTimeZone: getLocation

Timezone_name_from_abbr-Returns the timezone name from abbreviation

Timezone_name_get-alias DateTimeZone: getName

Timezone_offset_get-alias DateTimeZone: getOffset

Timezone_open-alias DateTimeZone ::__ construct

Timezone_transitions_get-alias DateTimeZone: getTransitions

Timezone_version_get-Gets the version of the timezonedb

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.