xref: /PHP-7.1/ext/date/tests/bug73942.phpt (revision f0519f48)
1--TEST--
2Bug #73942: $date->modify('Friday this week') doesn't return a Friday if $date is a Sunday
3--FILE--
4<?php
5$date1 = "2017-01-08"; // this is a Sunday
6$date = new \DateTime($date1);
7$date->modify('Friday this week');
8$dateFormat = $date->format('Y-m-d');
9echo $dateFormat, "\n";
10?>
11--EXPECT--
122017-01-06
13