Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP cal_info() Function

PHP cal_info() Function

PHP Calendar Reference Manual PHP Calendar Reference Manual

Example

Return information about the Gregorian calendar:

Run Example »


Definition and Usage

The cal_info() function returns information about a specified calendar.

Syntax

cal_info(

calendar);

Parameters Description
calendar Optional. Specifies a number representing the calendar to use. The following constants can be used:
  • 0 = CAL_GREGORIAN
  • 1 = CAL_JULIAN
  • 2 = CAL_JEWISH
  • 3 = CAL_FRENCH
  • Tip:If both the calendar If the parameter is omitted, cal_info() returns information about all calendars.

    |

    Technical Details

    | Return Value: | Returns an array containing the following calendar elements:

    | | --- | --- | | PHP Version: | 4.1+ | | Changelog: | In PHP 5.0, the *calendar* parameter became optional. |

    PHP Calendar Reference Manual PHP Calendar Reference Manual