From: Eric Hodel Date: 2006-12-02T14:04:13+09:00 Subject: Re: What's up with dates? On Dec 1, 2006, at 20:32 , Micah Wylde wrote: > I have a question about why dates are like they are in ruby. In ruby, > we have Date, DateTime, and Time, all of which seem to store about the > same thing, but have vastly different methods with which to interact > with the data, so the class you'd want to use varies according to what > your task is. However, there isn't an easy way to convert between the > three, which has caused a great deal of annoyance over the years I've > been using Ruby. Time is a time_t wrapper, and is limited in range by your OS (as small as 1970 to 2038). Date is a ruby class and stores a date of unlimited range. DateTime is a ruby class and stores a date and time of unlimited range. > In general, the situation with dates and times seems against the ideas > of ruby, and I'm curious how and why they came about, and whether > anything is going to be done about it in 1.9. Can anyone enlighten me? I haven't heard any plans, but patches will certainly hurry something like this along. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE!