The validity of the PHP validation date has a built-in function, the Checkdate function, which shares the definition and usage of the checkdate function.
Checkdate Definition and usage
The Checkdate () function validates a trellis-high-date. If the specified value is valid, the function returns True, otherwise false is returned.
The date is valid in the following cases:
Month is between and includes 1-12
The value of day is within the range of days that a given month should have, and leap years are taken into account.
Year is between and includes 1 to 32767
Checkdate syntax
Checkdate (Month,day,year)
Month is required. Prescribed month.
Day required. Prescribed day.
Year required. Prescribed year.
Examples of use are as follows:
The result will be output:
BOOL (TRUE)
BOOL (FALSE)
BOOL (TRUE)
Articles you may be interested in
- How JavaScript validates date-time validity
- PHP verifies the correctness and validity of the mailbox
- PHP Get time interval method Summary, PHP display forum posting time interval method Daquan
- PHP get the current time, time stamp method Big Summary
- thinkphp Automatic validation and auto-fill Invalid workaround
- PHP Extract the birthday date from the ID number and the function to verify whether it is a minor
- PHP get today's tomorrow yesterday time stamp of N method summary
- PHP gets the start timestamp and end timestamp for today, yesterday, last week, this month
http://www.bkjia.com/PHPjc/779408.html www.bkjia.com true http://www.bkjia.com/PHPjc/779408.html techarticle the validity of the PHP validation date has a built-in function, the Checkdate function, which shares the definition and usage of the checkdate function. Checkdate define and use the Checkdate () function to validate a lattice ...