Checks the validity of the date formed by the arguments.
A date is considered valid if each parameter is properly defined.
works like php's built in checkdate() function.
Leap years are taken into consideration.
e.g:
$obj->checkdate(10, 21, 1390); // Return true
$obj->checkdate(9, 31, 1390); // Return false
You can force gregorian checkdate if system default is jalali and you
need to check based on gregorian date
$check = $obj->checkdate(12, 31, 2011, false);
public static checkdate ( $month, $day, $year, $jalali = null ) : boolean | ||
$month | int The month is between 1 and 12 inclusive. | |
$day | int The day is within the allowed number of days for the given month. | |
$year | int The year is between 1 and 32767 inclusive. | |
$jalali | bool (Optional) pass false if you want to input gregorian time | |
리턴 | boolean |