Re: Time Libraries Rough Draft

Ashley Yakeley
The most obvious functions in Calendar are going to be these:
utcToCalendar :: TimeZone -> UTCTime -> CalendarTime calendarToUTC :: TimeZone -> CalendarTime -> UTCTime
And what would you do with the "UTCTime", whatever that is? You can't do arithmetic on it, because that is full of surprises, not only around leap seconds, but also around leap hours and days. You can only store it and read it back, but that can already be done with the CalendarTime itself. I think, the most useful operations are those that "roll" the calendar fields, say to advance by a day (which is not always 24 hours long). Converting a CalendarTime to a number of seconds is just useless, the apparent simplification only introduces complications. Udo. ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193

In article <1827606008@web.de>, "Udo Stenzel"
And what would you do with the "UTCTime", whatever that is? You can't do arithmetic on it, because that is full of surprises, not only around leap seconds, but also around leap hours and days.
Leap hours and days? -- Ashley Yakeley, Seattle WA

On 2005-02-14, Ashley Yakeley
In article <1827606008@web.de>, "Udo Stenzel"
wrote: And what would you do with the "UTCTime", whatever that is? You can't do arithmetic on it, because that is full of surprises, not only around leap seconds, but also around leap hours and days.
Leap hours and days?
*shrug*. Maybe he means the shifts that happen in localtime due to daylight savings time, for the first, and the February 29th that happens in leap years. Not that those are represented or make a difference in UTCTime. Udo, you really need to read the entire (long, yes) discussion in order to make useful comments. UTCTime is essentially just a count of seconds passed since the Unix Epoch of Jan 1 1970. One very important thing that UTCTime is used for is to represent unix (and a whole host of derived systems and programs) timestamps. -- Aaron Denney -><-
participants (3)
-
Aaron Denney
-
Ashley Yakeley
-
Udo Stenzel