setlocale() mktime()
getdate 获得时间及日期信息。
语法: array getdate(int timestamp);
返回值: 数组
函数种类: 时间日期
内容说明 返回数组的元素包括下列的项目:
"seconds" - 秒
"minutes" - 分
"hours" - 时
"mday" - 当月的第几天
"wday" - 当周的第几天数字
"mon" - 月份数字
"year" - 年,数字
"yday" - 当年的第几天数字; 如: "299"
"weekday" - 星期几全名; 如: "Friday"
"month" - 月份全名; 如: "January"
gettimeofday 取得目前时间。
语法: array gettimeofday(void);
返回值: 数组
函数种类: 时间日期
内容说明 返回数组的元素包括下列的项目:
"sec" - 秒
"usec" - 百万分之一秒
"minuteswest" - 格林威治时间的分
"dsttime" - 目的的时区
gmdate 取得目前与 GMT 差后的时间。
语法: string gmdate(string format, int timestamp);
返回值: 字符串
函数种类: 时间日期
内容说明 本函数与 date() 函数相似,不同的是本函数返回与格林威治标准时间 (Greenwich Mean Time, GMT) 时间差后的时间
使用范例
echo date( "M d Y H:i:s",mktime(0,0,0,1,1,1998) );
echo gmdate( "M d Y H:i:s",mktime(0,0,0,1,1,1998) );
?>
若执行本范例的机器在芬兰 (Finland, GMT +0200),返回的结果为:
Jan 01 1998 00:00:00
Dec 31 1997 22:00:00
参考 date() mktime() gmmktime()
easter_date 计算复活节日期。
语法: int easter_date(int [year]);
返回值: 整数
函数种类: 时间日期
内容说明: 输入某一年份,则以 UNIX 时间戳记的格式返回该年的复活节日期,若没有输入年份,则计算当年的日期。值的?注意的是输入的年份必需在公元 1970 至 2037 年之间,否则无法计算。
使用范例
echo date("M-d-Y", easter_date(1999));
echo date("M-d-Y", easter_date(2000));
echo date("M-d-Y", easter_date(2001));
?>
返回结果为
Apr-04-1999
Apr-23-2000
Apr-15-2001
easter_days 计算复活节与三月廿一日之间日期数。
语法: int easter_days(int [year]);
返回值: 整数
函数种类: 时间日期
内容说明 输入某一年份,则以计算该年复活节与三月二十一日之间的日期数,若没有输入年份,则以当年计算。这个函数可以用来替代 easter_date() 1970-2037 年外范围无法计算的问题。
使用范例
echo easter_days(1999);
echo easter_days(1492);
echo easter_days(1913);
?>
返回结果为:
14 (4/4)
32 (4/22)
2 (3/23)
参考 easter_date()
mktime 取得 UNIX 时间戳记。
语法: int mktime(int hour, int minute, int second, int month, int day, int year);
返回值: 整数
函数种类: 时间日期
内容说明: 输入一个时间,则返回 UNIX 时间戳记的长整数。
使用范例
echo date( "M-d-Y", mktime(0,0,0,12,32,1997) );
echo date( "M-d-Y", mktime(0,0,0,13,1,1997) );
echo date( "M-d-Y", mktime(0,0,0,1,1,1998) );
?>
参考 date() time()
gmmktime 取得 UNIX 时间戳记的格林威治时间。
语法: int gmmktime(int hour, int minute, int second, int month, int day, int year);
返回值: 整数
函数种类: 时间日期
内容说明: 输入一个时间,则返回 UNIX 的格林威治时间戳记的长整数。
time 取得目前时间的 UNIX 时间戳记。
语法: int time(void);
返回值: 整数
函数种类: 时间日期
内容说明 返回目前时间的戳记值。
参考 date()
microtime 取得目前时间的 UNIX 时间戳记的百万分之一秒值。
语法: string microtime(void);
返回值: 字符串
函数种类: 时间日期
内容说明 返回目前时间的百万分之一秒戳记值。若操作系统没有提供 gettimeofday() 的系统呼叫函数,则本函数亦无效。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Chinese version
Chinese version, very easy to use

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software