日期和时间
- 简介
- 安装/配置
- 预定义常量
- 示例
- DateTime — DateTime 类
- DateTime::add — 修改 DateTime 对象,增加天、月、年、小时、分钟以及秒的数量。
- DateTime::__construct — 返回新的 DateTime 对象
- DateTime::createFromFormat — 根据指定格式解析时间字符串
- DateTime::createFromImmutable — Returns new DateTime instance encapsulating the given DateTimeImmutable object
- DateTime::createFromInterface — Returns new DateTime object encapsulating the given DateTimeInterface object
- DateTime::getLastErrors — 别名 DateTimeImmutable::getLastErrors
- DateTime::modify — 修改日期时间对象的值
- DateTime::__set_state — __set_state 处理程序
- DateTime::setDate — 设置日期
- DateTime::setISODate — 设置 ISO 日期
- DateTime::setTime — 设置时间
- DateTime::setTimestamp — 以 Unix 时间戳的方式设置日期和时间
- DateTime::setTimezone — 设置 DateTime 对象的时区
- DateTime::sub — 对 DateTime 对象减去一定量的日、月、年、小时、分钟和秒。
- DateTimeImmutable — The DateTimeImmutable class
- DateTimeImmutable::add — Returns a new object, with added amount of days, months, years, hours, minutes and seconds
- DateTimeImmutable::__construct — Returns new DateTimeImmutable object
- DateTimeImmutable::createFromFormat — Parses a time string according to a specified format
- DateTimeImmutable::createFromInterface — Returns new DateTimeImmutable object encapsulating the given DateTimeInterface object
- DateTimeImmutable::createFromMutable — Returns new DateTimeImmutable instance encapsulating the given DateTime object
- DateTimeImmutable::getLastErrors — Returns the warnings and errors
- DateTimeImmutable::modify — Creates a new object with modified timestamp
- DateTimeImmutable::__set_state — The __set_state handler
- DateTimeImmutable::setDate — Sets the date
- DateTimeImmutable::setISODate — Sets the ISO date
- DateTimeImmutable::setTime — Sets the time
- DateTimeImmutable::setTimestamp — Sets the date and time based on a Unix timestamp
- DateTimeImmutable::setTimezone — Sets the time zone
- DateTimeImmutable::sub — Subtracts an amount of days, months, years, hours, minutes and seconds
- DateTimeInterface — The DateTimeInterface interface
- DateTimeInterface::diff — 返回两个 DateTime 之间的差值
- DateTimeInterface::format — 按照指定格式返回格式化后的日期
- DateTimeInterface::getOffset — 返回时差
- DateTimeInterface::getTimestamp — 获取 Unix 时间戳
- DateTimeInterface::getTimezone — 返回相对于指定 DateTime 的时区
- DateTime::__wakeup — The __wakeup handler
- DateTimeZone — DateTimeZone 类
- DateTimeZone::__construct — 创建新的DateTimeZone对象
- DateTimeZone::getLocation — 返回与时区相关的定位信息
- DateTimeZone::getName — 返回时区名称
- DateTimeZone::getOffset — 返回相对于 GMT 的时差
- DateTimeZone::getTransitions — Returns all transitions for the timezone
- DateTimeZone::listAbbreviations — 返回一个包含 dst (夏令时),时差和时区信息的关联数组。
- DateTimeZone::listIdentifiers — 返回包含了所有时区标识符的数字索引数组
- DateInterval — DateInterval 类
- DateInterval::__construct — Creates a new DateInterval object
- DateInterval::createFromDateString — Sets up a DateInterval from the relative parts of the string
- DateInterval::format — Formats the interval
- DatePeriod — DatePeriod 类
- DatePeriod::__construct — Creates a new DatePeriod object
- DatePeriod::createFromISO8601String — Creates a new DatePeriod object from an ISO8601 string
- DatePeriod::getDateInterval — Gets the interval
- DatePeriod::getEndDate — Gets the end date
- DatePeriod::getRecurrences — Gets the number of recurrences
- DatePeriod::getStartDate — Gets the start date
- Date/Time 函数
- checkdate — 验证一个格里高里日期
- date — 格式化 Unix 时间戳
- date_add — 别名 DateTime::add
- date_create — create a new DateTime object
- date_create_from_format — 别名 DateTime::createFromFormat
- date_create_immutable — create a new DateTimeImmutable object
- date_create_immutable_from_format — 别名 DateTimeImmutable::createFromFormat
- 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 — 别名 DateTimeImmutable::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 — 返回指定日期/时间的详细信息的关联数组
- date_parse_from_format — Get info about given date formatted according to the specified format
- 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
- 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 a timezone name by guessing from abbreviation and UTC offset
- timezone_name_get — 别名 DateTimeZone::getName
- timezone_offset_get — 别名 DateTimeZone::getOffset
- timezone_open — 别名 DateTimeZone::__construct
- timezone_transitions_get — 别名 DateTimeZone::getTransitions
- timezone_version_get — 获取 timezonedb 版本
- 日期/时间 Error 和 Exception
- Supported Date and Time Formats
- 所支持的时区列表
- DateError — The DateError class
- DateObjectError — The DateObjectError class
- DateRangeError — The DateRangeError class
- DateException — The DateException class
- DateInvalidOperationException — The DateInvalidOperationException class
- DateInvalidTimeZoneException — The DateInvalidTimeZoneException class
- DateMalformedIntervalStringException — The DateMalformedIntervalStringException class
- DateMalformedPeriodStringException — The DateMalformedPeriodStringException class
- DateMalformedStringException — The DateMalformedStringException class
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。