php日期和時間相關函數大全

來源:互聯網
上載者:User
checkdate — 驗證一個格裡高裡日期

date_add — 別名 DateTime::add

date_create_from_format — 別名 DateTime::createFromFormat

date_create_immutable_from_format — 別名 DateTimeImmutable::createFromFormat

date_create_immutable — 別名 DateTimeImmutable::__construct

date_create — 別名 DateTime::__construct

date_date_set — 別名 DateTime::setDate

date_default_timezone_get — 取得一個指令碼中所有日期時間函數所使用的預設時區

date_default_timezone_set — 設定用於一個指令碼中所有日期時間函數的預設時區

date_diff — 別名 DateTime::diff

date_format — 別名 DateTime::format

date_get_last_errors — 別名 DateTime::getLastErrors

date_interval_create_from_date_string — 別名 DateInterval::createFromDateString

date_interval_format — 別名 DateInterval::format

date_isodate_set — 別名 DateTime::setISODate

date_modify — 別名 DateTime::modify

date_offset_get — 別名 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 — 別名 DateTime::sub

date_sun_info — Returns an array with information about sunset/sunrise and twilight begin/end

date_sunrise — 返回給定的日期與地點的日出時間

date_sunset — 返回給定的日期與地點的日落時間

date_time_set — 別名 DateTime::setTime

date_timestamp_get — 別名 DateTime::getTimestamp

date_timestamp_set — 別名 DateTime::setTimestamp

date_timezone_get — 別名 DateTime::getTimezone

date_timezone_set — 別名 DateTime::setTimezone

date — 格式化一個本地時間/日期

getdate — 取得日期/時間資訊

gettimeofday — 取得目前時間

gmdate — 格式化一個 GMT/UTC 日期/時間

gmmktime — 取得 GMT 日期的 UNIX 時間戳記

gmstrftime — 根據地區設定格式化 GMT/UTC 時間/日期

idate — 將本地時間日期格式化為整數

localtime — 取得本地時間

microtime — 返回當前 Unix 時間戳記和微秒數

mktime — 取得一個日期的 Unix 時間戳記

strftime — 根據地區設定格式化本地時間/日期

strptime — 解析由 strftime 產生的日期/時間

strtotime — 將任何英文文本的日期時間描述解析為 Unix 時間戳記

time — 返回當前的 Unix 時間戳記

timezone_abbreviations_list — 別名 DateTimeZone::listAbbreviations

timezone_identifiers_list — 別名 DateTimeZone::listIdentifiers

timezone_location_get — 別名 DateTimeZone::getLocation

timezone_name_from_abbr — Returns the timezone name from abbreviation

timezone_name_get — 別名 DateTimeZone::getName

timezone_offset_get — 別名 DateTimeZone::getOffset

timezone_open — 別名 DateTimeZone::__construct

timezone_transitions_get — 別名 DateTimeZone::getTransitions

timezone_version_get — Gets the version of the timezonedb

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.