Home > Article > Backend Development > PHP introductory tutorial (21) PHP date and time functions
2, date() To convert a UNIX timestamp into a readable current time, use the date() function. The prototype of the date function is as follows:
output: 2013/11/21 2013.11.21 2013-11-21 3, mktime() The mktime() function returns the Unix timestamp of a date. Parameter description:
output: Jan-05-2002 Feb-01-2002 Jan-01-2001 Jan-01-1999 4.checkdate() The checkdate() function verifies a Gregorian date. The function returns true if the specified value is legal, false otherwise. Dates are legal if: month is between and including 1 - 12 The value of Day is within the range of days that a given month should have, taking leap years into account. year is between and including 1 to 32767 grammar checkdate(month,day,year) parameter
output: bool(true) bool(false) bool(true) >> View more php introductory tutorials |