diff options
Diffstat (limited to 'lib/time.rb')
-rw-r--r-- | lib/time.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/time.rb b/lib/time.rb index 3728fef59c..2225f68abb 100644 --- a/lib/time.rb +++ b/lib/time.rb @@ -214,7 +214,8 @@ class Time if o != 0 then hour += o; o, hour = hour.divmod(24); off += o end if off != 0 day += off - if month_days(year, mon) < day + days = month_days(year, mon) + if days and days < day mon += 1 if 12 < mon mon = 1 |