PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<cyrus_unbindcheckdate>
Last updated: Mon, 16 Jul 2012

XX. 时间日期函数库

简介

可以用这些函数得到 PHP 所运行的服务器的日期和时间。可以用这些函数将日期和时间以很多不同方式格式化输出。

注: 请留意这些函数依赖于服务器的地区设置。确认在使用这些函数时考虑到了夏令时的设置和闰年。

需求

无需外部库文件就可以加入本扩展模块的支持。

安装

这些函数作为 PHP 核心的一部分,无需被安装即可使用。

运行时配置

本扩展模块在 php.ini 中未定义任何设置指令。

资源类型

本扩展模块未定义任何资源类型。

预定义常量

本扩展模块未定义任何常量。

目录
checkdate -- 验证一个格里高里日期
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 -- 格式化一个本地时间/日期
getdate -- 取得日期/时间信息
gettimeofday -- 取得当前时间
gmdate -- 格式化一个 GMT/UTC 日期/时间
gmmktime -- 取得 GMT 日期的 UNIX 时间戳
gmstrftime --  根据区域设置格式化 GMT/UTC 时间/日期
idate -- Format a local time/date as integer
localtime -- 取得本地时间
microtime --  返回当前 UNIX 时间戳和微秒数
mktime -- 取得一个日期的 UNIX 时间戳
strftime --  根据区域设置格式化本地时间/日期
strptime --  Parse a time/date generated with strftime()
strtotime --  将任何英文文本的日期时间描述解析为 UNIX 时间戳
time -- 返回当前的 UNIX 时间戳



<cyrus_unbindcheckdate>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST