PHP cal_info() function

PHP cal_from_jd function
PHP cal_to_jd() function

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);
ParametersDetails
calendarSpecify 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
PHP cal_info() function

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));
?>

PHP cal_from_jd function
PHP cal_to_jd() function
en English
X
Scroll to Top