summaryrefslogtreecommitdiff
path: root/ext/calendar/tests/cal_from_jd.phpt
blob: 9614522a05de56a2148695de40c6076a38dfa440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--TEST--
cal_from_jd()
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
print_r(cal_from_jd(1748326, CAL_GREGORIAN));
print_r(cal_from_jd(1748324, CAL_JULIAN));
print_r(cal_from_jd( 374867, CAL_JEWISH));
print_r(cal_from_jd(      0, CAL_FRENCH));
?>
--EXPECT--
Array
(
    [date] => 8/26/74
    [month] => 8
    [day] => 26
    [year] => 74
    [dow] => 0
    [abbrevdayname] => Sun
    [dayname] => Sunday
    [abbrevmonth] => Aug
    [monthname] => August
)
Array
(
    [date] => 8/26/74
    [month] => 8
    [day] => 26
    [year] => 74
    [dow] => 5
    [abbrevdayname] => Fri
    [dayname] => Friday
    [abbrevmonth] => Aug
    [monthname] => August
)
Array
(
    [date] => 8/26/74
    [month] => 8
    [day] => 26
    [year] => 74
    [dow] => 4
    [abbrevdayname] => Thu
    [dayname] => Thursday
    [abbrevmonth] => Nisan
    [monthname] => Nisan
)
Array
(
    [date] => 0/0/0
    [month] => 0
    [day] => 0
    [year] => 0
    [dow] => 1
    [abbrevdayname] => Mon
    [dayname] => Monday
    [abbrevmonth] => 
    [monthname] => 
)