PHP checkdate() function

PHP unixtojd() Function
PHP date_add() function

In this article, you will learn how to check if a date is valid or not. The PHP checkdate() function check if a Gregorian date is valid or invalid.

What is the syntax of the checkdate() function in PHP?

checkdate(month, day, year)
monthSpecify the month number(1-12) – Required
daySpecify the month number(1-31) – Required
yearSpecify the year number (1-32767)- Required
PHP checkdate() method

Examples of the checkdate() function

Example 1. In this example, use checkdate() function on different Gregorian dates.

echo "<br>";
echo "<br>";
PHP unixtojd() Function
PHP date_add() function

Add comment

Tutor Network

Share this

Learn PHP from A to Z