January 2000
Beginner to intermediate
128 pages
1h 48m
English
PHP provides the following functions for working with dates and times:
bool checkdate(int month, int day, int year)Validate a date/time
string date(string format[, int timestamp])Format a local date/time
array getdate([int timestamp])Get date/time information
array gettimeofday(void)Return the current time as an array
string gmdate(string format[, int timestamp])Format a GMT/CUT date/time
int gmmktime(int hour, int min, int sec, int mon, int mday, int year)Get Unix timestamp for a GMT date
string gmstrftime(string format[, int timestamp]) Format a GMT/CUT time/date according to local settings
string microtime(void)Return a string containing the current time in seconds and microseconds
int mktime(int hour, int min, int sec, int mon, int mday, int year)Get Unix timestamp for a date
string strftime(string format[, int timestamp])Format a local time/date according to local settings
int time(void)Return current Unix timestamp
Read now
Unlock full access