Yukihiro Matsumoto
11/3/2004 7:47:00 PM
Hi,
In message "Re: dates earlier than 1970?"
on Thu, 4 Nov 2004 04:28:46 +0900, "Kevin Howe" <khowe@perfnet.ca> writes:
|I have a web app that collects new employee info, one of the fields being
|"Birth date". However since many of the employees were born earlier than
|1970 I am unable to turn these into Ruby Time/Date objects. Is there a ruby
|library that can handle dates earlier than 1970?
(1) If your platform handles negative time_t, Time can be as old as
1902, which might be long enough to represent _most_ of employees'
birth date. Try Time.at(1965, 4, 14) for example.
(2) Date class can represent arbitrary date on the calendar, even back
to 4713 B.C, which covers, as I believe, _all_ employees.
Just require "date".
matz.