@@ -120,7 +120,7 @@ public function testHumanizeMonthsForward(): void
120120 $ current = Time::parse ('March 1, 2017 ' , 'America/Chicago ' );
121121 $ diff = $ current ->difference ('May 1, 2017 ' , 'America/Chicago ' );
122122
123- $ this ->assertSame ('in 1 month ' , $ diff ->humanize ('en ' ));
123+ $ this ->assertSame ('in 2 months ' , $ diff ->humanize ('en ' ));
124124 }
125125
126126 public function testHumanizeDaysSingle (): void
@@ -211,12 +211,20 @@ public function testHumanizeWeeksPlural(): void
211211 $ this ->assertSame ('2 weeks ago ' , $ diff ->humanize ('en ' ));
212212 }
213213
214- public function testHumanizeWeeksForward (): void
214+ public function testHumanizeWeeksForwardDST (): void
215215 {
216216 $ current = Time::parse ('March 10, 2017 ' , 'America/Chicago ' );
217217 $ diff = $ current ->difference ('March 18, 2017 ' , 'America/Chicago ' );
218218
219- $ this ->assertSame ('in 1 week ' , $ diff ->humanize ('en ' ));
219+ $ this ->assertSame ('in 2 weeks ' , $ diff ->humanize ('en ' ));
220+ }
221+
222+ public function testHumanizeWeeksForwardUTC (): void
223+ {
224+ $ current = Time::parse ('2017-03-10 ' );
225+ $ diff = $ current ->difference ('2017-03-18 ' );
226+
227+ $ this ->assertSame ('in 2 weeks ' , $ diff ->humanize ('en ' ));
220228 }
221229
222230 public function testHumanizeNoDifference (): void
@@ -238,14 +246,14 @@ public function testGetterUTC(): void
238246 $ this ->assertNull ($ diff ->nonsense );
239247 }
240248
241- public function testGetterChicagoTime (): void
249+ public function testGetterDST (): void
242250 {
243251 $ current = Time::parse ('March 10, 2017 ' , 'America/Chicago ' );
244252 $ diff = $ current ->difference ('March 18, 2017 ' , 'America/Chicago ' );
245253
246254 // Daylight Saving Time had begun since Sun, 12 Mar, 02:00.
247- $ this ->assertSame (7 , $ diff ->getDays ());
248- $ this ->assertSame (7 , $ diff ->days );
255+ $ this ->assertSame (8 , $ diff ->getDays ());
256+ $ this ->assertSame (8 , $ diff ->days );
249257
250258 // The raw value does not take Daylight Saving Time into account.
251259 $ this ->assertSame (-8 , (int ) round ($ diff ->getDays (true )));
0 commit comments