xref: /PHP-8.2/ext/calendar/tests/jddayofweek.phpt (revision 56f90492)
1--TEST--
2jddayofweek()
3--EXTENSIONS--
4calendar
5--FILE--
6<?php
7foreach (array(2440588, 2452162, 2453926, -1000) as $jd) {
8  echo "### JD $jd ###\n";
9  foreach (array(CAL_DOW_DAYNO, CAL_DOW_LONG, CAL_DOW_SHORT) as $mode) {
10    echo "--- mode $mode ---\n";
11    for ($offset = 0; $offset <= 7; $offset++) {
12      echo jddayofweek($jd + $offset, $mode). "\n";
13    }
14  }
15}
16?>
17--EXPECT--
18### JD 2440588 ###
19--- mode 0 ---
204
215
226
230
241
252
263
274
28--- mode 1 ---
29Thursday
30Friday
31Saturday
32Sunday
33Monday
34Tuesday
35Wednesday
36Thursday
37--- mode 2 ---
38Thu
39Fri
40Sat
41Sun
42Mon
43Tue
44Wed
45Thu
46### JD 2452162 ###
47--- mode 0 ---
480
491
502
513
524
535
546
550
56--- mode 1 ---
57Sunday
58Monday
59Tuesday
60Wednesday
61Thursday
62Friday
63Saturday
64Sunday
65--- mode 2 ---
66Sun
67Mon
68Tue
69Wed
70Thu
71Fri
72Sat
73Sun
74### JD 2453926 ###
75--- mode 0 ---
760
771
782
793
804
815
826
830
84--- mode 1 ---
85Sunday
86Monday
87Tuesday
88Wednesday
89Thursday
90Friday
91Saturday
92Sunday
93--- mode 2 ---
94Sun
95Mon
96Tue
97Wed
98Thu
99Fri
100Sat
101Sun
102### JD -1000 ###
103--- mode 0 ---
1042
1053
1064
1075
1086
1090
1101
1112
112--- mode 1 ---
113Tuesday
114Wednesday
115Thursday
116Friday
117Saturday
118Sunday
119Monday
120Tuesday
121--- mode 2 ---
122Tue
123Wed
124Thu
125Fri
126Sat
127Sun
128Mon
129Tue
130