From: Jamis Buck Date: 2004-11-04T04:44:29+09:00 Subject: Re: dates earlier than 1970? Kevin Howe wrote: > 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? String? I honestly don't mean that facetiously, either. If you enforce the right format on the strings, you can do date-wise comparisons on them, and extract date-part info via regexps: "1964-07-25" < "1974-07-25" year = "1964-07-25".match(/^(\d\d\d\d)-/ )[1].to_i Certainly, the above could benefit from a minimal wrapper around it to make things like date-part extraction less cumbersome. But for most of the things I use dates for, strings suffice. -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis