mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +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).
21 lines
697 B
PHP
21 lines
697 B
PHP
--TEST--
|
|
Bug #72719: Relative datetime format ignores weekday on sundays only
|
|
--FILE--
|
|
<?php
|
|
echo (new DateTimeImmutable('Monday next week 13:00'))->format('l'), "\n";
|
|
echo (new DateTimeImmutable('Tuesday next week 14:00'))->format('l'), "\n";
|
|
echo (new DateTimeImmutable('Wednesday next week 14:00'))->format('l'), "\n";
|
|
echo (new DateTimeImmutable('Thursday next week 15:00'))->format('l'), "\n";
|
|
echo (new DateTimeImmutable('Friday next week 16:00'))->format('l'), "\n";
|
|
echo (new DateTimeImmutable('Saturday next week 17:00'))->format('l'), "\n";
|
|
echo (new DateTimeImmutable('Sunday next week 18:00'))->format('l'), "\n";
|
|
?>
|
|
--EXPECT--
|
|
Monday
|
|
Tuesday
|
|
Wednesday
|
|
Thursday
|
|
Friday
|
|
Saturday
|
|
Sunday
|