xref: /PHP-5.4/ext/calendar/tests/cal_info.phpt (revision e94670d4)
1--TEST--
2cal_info()
3--INI--
4date.timezone=UTC
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9  print_r(cal_info());
10  print_r(cal_info(1));
11  print_r(cal_info(99999));
12?>
13--EXPECTF--
14Array
15(
16    [0] => Array
17        (
18            [months] => Array
19                (
20                    [1] => January
21                    [2] => February
22                    [3] => March
23                    [4] => April
24                    [5] => May
25                    [6] => June
26                    [7] => July
27                    [8] => August
28                    [9] => September
29                    [10] => October
30                    [11] => November
31                    [12] => December
32                )
33
34            [abbrevmonths] => Array
35                (
36                    [1] => Jan
37                    [2] => Feb
38                    [3] => Mar
39                    [4] => Apr
40                    [5] => May
41                    [6] => Jun
42                    [7] => Jul
43                    [8] => Aug
44                    [9] => Sep
45                    [10] => Oct
46                    [11] => Nov
47                    [12] => Dec
48                )
49
50            [maxdaysinmonth] => 31
51            [calname] => Gregorian
52            [calsymbol] => CAL_GREGORIAN
53        )
54
55    [1] => Array
56        (
57            [months] => Array
58                (
59                    [1] => January
60                    [2] => February
61                    [3] => March
62                    [4] => April
63                    [5] => May
64                    [6] => June
65                    [7] => July
66                    [8] => August
67                    [9] => September
68                    [10] => October
69                    [11] => November
70                    [12] => December
71                )
72
73            [abbrevmonths] => Array
74                (
75                    [1] => Jan
76                    [2] => Feb
77                    [3] => Mar
78                    [4] => Apr
79                    [5] => May
80                    [6] => Jun
81                    [7] => Jul
82                    [8] => Aug
83                    [9] => Sep
84                    [10] => Oct
85                    [11] => Nov
86                    [12] => Dec
87                )
88
89            [maxdaysinmonth] => 31
90            [calname] => Julian
91            [calsymbol] => CAL_JULIAN
92        )
93
94    [2] => Array
95        (
96            [months] => Array
97                (
98                    [1] => Tishri
99                    [2] => Heshvan
100                    [3] => Kislev
101                    [4] => Tevet
102                    [5] => Shevat
103                    [6] => AdarI
104                    [7] => AdarII
105                    [8] => Nisan
106                    [9] => Iyyar
107                    [10] => Sivan
108                    [11] => Tammuz
109                    [12] => Av
110                    [13] => Elul
111                )
112
113            [abbrevmonths] => Array
114                (
115                    [1] => Tishri
116                    [2] => Heshvan
117                    [3] => Kislev
118                    [4] => Tevet
119                    [5] => Shevat
120                    [6] => AdarI
121                    [7] => AdarII
122                    [8] => Nisan
123                    [9] => Iyyar
124                    [10] => Sivan
125                    [11] => Tammuz
126                    [12] => Av
127                    [13] => Elul
128                )
129
130            [maxdaysinmonth] => 30
131            [calname] => Jewish
132            [calsymbol] => CAL_JEWISH
133        )
134
135    [3] => Array
136        (
137            [months] => Array
138                (
139                    [1] => Vendemiaire
140                    [2] => Brumaire
141                    [3] => Frimaire
142                    [4] => Nivose
143                    [5] => Pluviose
144                    [6] => Ventose
145                    [7] => Germinal
146                    [8] => Floreal
147                    [9] => Prairial
148                    [10] => Messidor
149                    [11] => Thermidor
150                    [12] => Fructidor
151                    [13] => Extra
152                )
153
154            [abbrevmonths] => Array
155                (
156                    [1] => Vendemiaire
157                    [2] => Brumaire
158                    [3] => Frimaire
159                    [4] => Nivose
160                    [5] => Pluviose
161                    [6] => Ventose
162                    [7] => Germinal
163                    [8] => Floreal
164                    [9] => Prairial
165                    [10] => Messidor
166                    [11] => Thermidor
167                    [12] => Fructidor
168                    [13] => Extra
169                )
170
171            [maxdaysinmonth] => 30
172            [calname] => French
173            [calsymbol] => CAL_FRENCH
174        )
175
176)
177Array
178(
179    [months] => Array
180        (
181            [1] => January
182            [2] => February
183            [3] => March
184            [4] => April
185            [5] => May
186            [6] => June
187            [7] => July
188            [8] => August
189            [9] => September
190            [10] => October
191            [11] => November
192            [12] => December
193        )
194
195    [abbrevmonths] => Array
196        (
197            [1] => Jan
198            [2] => Feb
199            [3] => Mar
200            [4] => Apr
201            [5] => May
202            [6] => Jun
203            [7] => Jul
204            [8] => Aug
205            [9] => Sep
206            [10] => Oct
207            [11] => Nov
208            [12] => Dec
209        )
210
211    [maxdaysinmonth] => 31
212    [calname] => Julian
213    [calsymbol] => CAL_JULIAN
214)
215
216Warning: cal_info(): invalid calendar ID 99999. in %s on line %d
217