File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ private function isLessThan44Min29Secs(DateInterval $timeDifference)
201
201
return false ;
202
202
};
203
203
204
- return $ timeDifference ->i < 45 &&
205
- $ timeDifference ->s < 30 &&
204
+ return ( $ timeDifference ->i < 44 ||
205
+ ( $ timeDifference ->i === 44 && $ timeDifference -> s < 30 )) &&
206
206
! $ this ->isLessThan1Min29Seconds ($ timeDifference );
207
207
}
208
208
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public function testTimeAgoInWords()
46
46
47
47
// testing 2..44 minutes
48
48
$ this ->assertContains ('minutes ago ' , $ timeAgo ->inWordsFromStrings ("-2 minute " ));
49
+ $ this ->assertContains ('minutes ago ' , $ timeAgo ->inWordsFromStrings ("-2 minute -40 second " ));
49
50
$ this ->assertContains ('minutes ago ' , $ timeAgo ->inWordsFromStrings ("-44 minute " ));
50
51
$ this ->assertContains ('minutes ago ' , $ timeAgo ->inWordsFromStrings ("-44 minute -29 second " ));
51
52
$ this ->assertNotContains ('minutes ago ' , $ timeAgo ->inWordsFromStrings ("-44 minute -30 second " ));
You can’t perform that action at this time.
0 commit comments