PHP cal_info()Functions
Examples
Returns information about the Gregorian calendar:
<?php
print_r(cal_info(0));
?>
print_r(cal_info(0));
?>
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:
Tip:Ifcalendarthe 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,calendarthe parameter is optional. |
PHP Calendar Reference Manual Other Extensions