1--TEST--
2jdtomonthname() test
3--SKIPIF--
4<?php if (!extension_loaded("calendar")) print "skip"; ?>
5--FILE--
6<?php
7
8$jd_days = Array(
9    2453396,
10    2440588,
11    -1,
12    10000000
13    );
14
15foreach ($jd_days as $jd_day) {
16    echo "=== ", $jd_day, "\n";
17    var_dump(jdmonthname($jd_day,0));
18    var_dump(jdmonthname($jd_day,1));
19    var_dump(jdmonthname($jd_day,2));
20    var_dump(jdmonthname($jd_day,3));
21    var_dump(jdmonthname($jd_day,4));
22    var_dump(jdmonthname($jd_day,5));
23    echo "\n";
24}
25
26echo "Done\n";
27
28?>
29--EXPECT--
30=== 2453396
31string(3) "Jan"
32string(7) "January"
33string(3) "Jan"
34string(7) "January"
35string(6) "Shevat"
36string(0) ""
37
38=== 2440588
39string(3) "Jan"
40string(7) "January"
41string(3) "Dec"
42string(8) "December"
43string(5) "Tevet"
44string(0) ""
45
46=== -1
47string(0) ""
48string(0) ""
49string(0) ""
50string(0) ""
51string(0) ""
52string(0) ""
53
54=== 10000000
55string(3) "Dec"
56string(8) "December"
57string(3) "Jul"
58string(4) "July"
59string(6) "Tishri"
60string(0) ""
61
62Done
63