[BUG] Date class-subtractDays returns nonexistent days (plus goodie)

Ned Konz ned at bike-nomad.com
Sun Mar 18 17:28:29 UTC 2001


On Sunday 18 March 2001 07:36, Rob Vens wrote:

> Something that bothered me for many years. In astronomy there is no such
> thing as a calender but a Julian Day count is used that is much more
> flexible (and not error prone) than all algorithms used in computer systems
> that I know of. I always wondered why we do not use this technique in
> Smalltalk, I have a nice goodie attached if you want to check it out. This
> goodie BTW contains an implementation of computing Easter dates based on
> this scientifically rigorous time algorithm. I think we should use this
> method to implement calender functions.

Well, you can do:

Date today asJulianDayNumber 			2451987
Date fromJulianDayNumber: 2451987		 	18 March 2001

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list