File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
calendar /
tests /
jddayofweek.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:53 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
jddayofweek()
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
foreach (array(2440588, 2452162, 2453926, -1000) as $jd) {
echo "### JD $jd ###\n";
for ($mode = 0; $mode <= 2; $mode++) {
echo "--- mode $mode ---\n";
for ($offset = 0; $offset <= 7; $offset++) {
echo jddayofweek($jd + $offset, $mode). "\n";
}
}
}
?>
--EXPECT--
### JD 2440588 ###
--- mode 0 ---
4
5
6
0
1
2
3
4
--- mode 1 ---
Thursday
Friday
Saturday
Sunday
Monday
Tuesday
Wednesday
Thursday
--- mode 2 ---
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
### JD 2452162 ###
--- mode 0 ---
0
1
2
3
4
5
6
0
--- mode 1 ---
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
--- mode 2 ---
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
### JD 2453926 ###
--- mode 0 ---
0
1
2
3
4
5
6
0
--- mode 1 ---
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
--- mode 2 ---
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
### JD -1000 ###
--- mode 0 ---
2
3
4
5
6
0
1
2
--- mode 1 ---
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
Monday
Tuesday
--- mode 2 ---
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>