In this article, you will learn how to get the details of the given calendar. The cal_info() function returns the information about the given calendar.
What is the syntax of the cal_info() function in PHP?
cal_info(calendar);
Parameters | Details |
---|---|
calendar | Specify one of the calendars below to get information about (use the numbers instead of their names) 0 – CAL_GREGORIAN 1- CAL_JULIAN 2- CAL_JEWISH 3- CAL_FRENCH |
Note: If no number is specified in the cal_info() function, it will return information about all the calendars supported in the above table.
Examples of cal_info() function
Example 1. Get the information about the Gregorian Calendar.
<?php
print_r(cal_info(0));
?>