Also, given that Julia time is based on UT, Time is well-defined – a Time is conceptually an equivalence class of DateTimes that differ by exactly an integral number of days. If you think of a Date as the set of DateTimes that occur during the same UTC day, Date x Time is naturally isomorphic to DateTime.
On Fri, Mar 13, 2015 at 2:58 PM, Stefan Karpinski <[email protected]> wrote: > Printing is one issue; I encountered it because I was wrapping an API that > has Date, DateTime and Time types, which I ended up mapping to Date, > DateTime and DateTime values, but with the DateTime values coming from > Times having nonsense in the date parts. Kind of awkward. Returning seconds > would just be kind of awkward and confusing. > > On Fri, Mar 13, 2015 at 2:48 PM, Steven G. Johnson <[email protected]> > wrote: > >> >> >> On Friday, March 13, 2015 at 12:28:50 PM UTC-4, Stefan Karpinski wrote: >>> >>> Yes, but the representation is quite inefficient. This would be an >>> efficient scalar type. >>> >> >> Couldn't you just represent it by Dates.Second (if you want second >> resolution) or Dates.Millisecond (if you want millisecond resolution)? Or >> are you worried about entry and pretty-printing? >> > >
