From: Ben Tilly Date: 2001-01-31T11:04:11+09:00 Subject: [ruby-talk:10153] Re: DateTime class for Ruby? andy@toolshed.com (Andrew Hunt) wrote: > >On Wed, 31 Jan 2001 06:43:05 +0900, Michael Neumann > >wrote: > > Hi, > > > > Is there a "DateTime" class in Ruby, which can handle dates before 1970 > > as well as storing the time? > > If I use Date from "date.rb" this will not store the time, and > > if I use Time this will raise an "time out of range" error when year is >below 1970 (UNIX-date :(. > > >Most people don't seem to care about time when dealing with >dates a few hundred years old :-) > >Just out of curiosity, what is the application that >requires this? I don't know what application they had, but there are quite a few that I know where the Unix default is not acceptable. In general what you want is a generic date class. You don't care about the time per se, except as a convenient way to figure out business days while calculating (for instance) loan payment schedules. For a random application where you would care about an actual time several decades past, consider astrology programs. A general-purpose library should attempt to anticipate and provide for unexpected uses... Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com