When should you use DateTime and when should you use Time?
It's a common misconception that [William Shakespeare] and [Miguel de Cervantes] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact]. However because England hadn't yet adopted [Gregorian Calendar Reform] (and wouldn't until ) their deaths are actually 10 days apart. Since Ruby's
Time class implements a [proleptic Gregorian calendar] and has no concept of calendar reform then there's no way to express this. This is where
DateTime steps in:
>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND) => Tue, 23 Apr 1616 00:00:00 +0000 >> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY) => Sat, 23 Apr 1616 00:00:00 +0000