The cal_info() function returns information about a calendar.
PHP cal_info() Function has the following syntax.
cal_info(calendar);
Optional calendar indicates which calendar to get information.
If the calendar parameter is omitted, cal_info() returns info about all calendars.
PHP cal_info() Function returns an array containing calendar elements like:
Get information about a calendar
<?php
print_r(cal_info(0));
?>
The code above generates the following result.
The following code shows how to get information about the Gregorian calendar.
<?php
print_r(cal_info(CAL_GREGORIAN));
?>
The code above generates the following result.