From: "Suraj N. Kurapati" Date: 2006-10-07T16:03:17+09:00 Subject: Re: In the year 2525, afloat -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bill Kelly wrote: > From: >> >> On Sat, 7 Oct 2006, David Vallner wrote: >> >>> Jim v. Tess wrote: >>>> Is there a reason why Time.local can't handle dates beyond 2038? I >>>> know >>>> that's when the number of second since 1970 exceeds 2^32, but can't a >>>> big, strong language like Ruby handle it? >>>> >>> >>> Because it uses the underlying platform's time manipulation functions? >> >> Yes. >> >>> Mebbe hack around the issue by providing Ruby replacements for large >>> timestamps? Then again, maybe that's what the Date / DateTime classes >>> do. Buggered if I know, I could never remember which one did what. >> >> Yes. DateTime uses Rational to represent time. 1 represents a day, >> not a second. It can be used with arbitrary dates well outside the >> range of Time, but it is MUCH slower. Use Time everywhere one can. > > DateTime sounds nice. As cool as ruby's automatic Fixnum -> Bignum > auto-conversions are, one imagines a date where even someone learning > ruby might be able to specify "puts 2**256" (can already), or > Date.years_ago( -13_700_000_000 ).to_s > => "Big Bang" > > > Is it not theoretically possible to make a "fixnum->bignum-like Date", > where it would be fast until its precision was exceeded? Then morph > into a badass DateTime that could handle dinosaurs, and big bangs, etc.? Furthermore, what about automatic Float -> BigDecimal conversion? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFFJ1FymV9O7RYnKMcRAkU/AKCRnJbfT6yq2kl/TXa2PD77kVEoxgCfVkZH uZBiltQMjjiPdB2wgNFwDPU= =mXTx -----END PGP SIGNATURE-----