ruby / date

A subclass of Object includes Comparable module for handling dates.
Other
70 stars 37 forks source link

Fix Time#to_datetime before calendar reform #73

Closed nobu closed 2 years ago

nobu commented 2 years ago

Time is always in the proleptic Gregorian calendar. Also DateTime#to_time should convert to the Gregorian calendar first, before extracting its components.

https://bugs.ruby-lang.org/issues/18946#change-98527