Skip to content

Commit

Permalink
Fix #57
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Aug 17, 2019
1 parent facc211 commit de177b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Russian/NounDeclension.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class NounDeclension extends BaseInflection implements Cases, Gender
// на а
'боа', 'бра', 'фейхоа', 'амплуа', 'буржуа',
// на о
'манго', 'какао', 'кино', 'трюмо', 'пальто', 'бюро', 'танго', 'вето', 'бунгало', 'сабо', 'авокадо', 'депо',
'манго', 'какао', 'кино', 'трюмо', 'пальто', 'бюро', 'танго', 'вето', 'бунгало', 'сабо', 'авокадо', 'депо', 'панно',
// на у
'зебу', 'кенгуру', 'рагу', 'какаду', 'шоу',
// на е
Expand Down
3 changes: 2 additions & 1 deletion src/TimeSpeller.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public static function spellInterval(DateInterval $interval, $options = 0, $limi
*/
public static function spellDifference($dateTime, $options = 0, $limit = 0)
{
$now = new DateTime();
if (is_numeric($dateTime) || is_string($dateTime)) {
$dateTime = new DateTime(is_numeric($dateTime)
? '@' . $dateTime
Expand All @@ -102,6 +103,6 @@ public static function spellDifference($dateTime, $options = 0, $limit = 0)
throw new InvalidArgumentException('dateTime argument should be unix timestamp (int) or date time (string) or DateTime instance');
}

return static::spellInterval($dateTime->diff(new DateTime()), $options, $limit);
return static::spellInterval($dateTime->diff($now), $options, $limit);
}
}

0 comments on commit de177b3

Please sign in to comment.