mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
f0519f4837
This fixes: - Fixed bug #72719 (Relative datetime format ignores weekday on sundays only). - Fixed bug #73294 (DateTime wrong when date string is negative). - Fixed bug #73489 (wrong timestamp when call setTimeZone multi times with UTC offset). - Fixed bug #73858 (first/last day of' flag is not being reset). - Fixed bug #73942 ($date->modify('Friday this week') doesn't return a Friday if $date is a Sunday). - Fixed bug #74057 (wrong day when using "this week" in strtotime).
25 lines
1.0 KiB
PHP
25 lines
1.0 KiB
PHP
--TEST--
|
|
Bug #74057: wrong day when using "this week" in strtotime
|
|
--FILE--
|
|
<?php
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sun 2017-01-01")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Mon 2017-01-02")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Tue 2017-01-03")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Wed 2017-01-04")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Thu 2017-01-05")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Fri 2017-01-06")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sat 2017-01-07")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sun 2017-01-08")))."\n";
|
|
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Mon 2017-01-09")))."\n";
|
|
?>
|
|
--EXPECT--
|
|
Sat 2016-12-31
|
|
Sat 2017-01-07
|
|
Sat 2017-01-07
|
|
Sat 2017-01-07
|
|
Sat 2017-01-07
|
|
Sat 2017-01-07
|
|
Sat 2017-01-07
|
|
Sat 2017-01-07
|
|
Sat 2017-01-14
|