PHP cal info

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : cal_info() function

Description

The cal_info() function is used to get the information of a specific calendar.

Version

(PHP 4 and above)

Syntax

cal_info(calendar)

Parameter

Name

Description

Required /
Optional

Type

calendar

Supported calendar/values
0 - CAL_GREGORIAN
1- CAL_JULIAN
2 - CAL_JEWISH
3 - CAL_FRENCH

Optional

Integer

If no calendar is specified information on all supported calendars is returned as an array.

Return value

An array.

Value Type : Array.

Example :

  1. $c_info=cal_info(1);  

  2. print_r($c_info);  

  3. ?>  

Output :

Array ( [months] => Array ( [1] => January [2] => February [3] => March [4] => April [5] => May [6] => June [7] => July [8] => August [9] => September [10] => October [11] => November [12] => December ) [abbrevmonths] => Array ( [1] => Jan [2] => Feb [3] => Mar [4] => Apr [5] => May [6] => Jun [7] => Jul [8] => Aug [9] => Sep [10] => Oct [11] => Nov [12] => Dec ) [maxdaysinmonth] => 31 [calname] => Julian [calsymbol] => CAL_JULIAN )