Yes I was, Rick. Thanks a bunch -- that's got me on a bit.

NB: I notice the DATES ws which came in the Tools folder of my old
APL+Win installation (3.5) is quite different from the one I've been
using. It is dated 1994. I must have downloaded Davin Church's DATES
from the apl2000.com website around 2001. They used to offer free
customer-contributed wss, but now it seems they don't.

Ian


On Fri, Sep 11, 2009 at 7:24 PM, Sherlock, Ric
<[email protected]> wrote:
> Ian,
> Are you thinking of the DATES.w3 workspace by Davin Church? If so then you'll 
> be interested in
> http://www.jsoftware.com/jwiki/Scripts/JulianDayDate
> This was one of my earliest projects when I started learning J, so the J code 
> is very much a translation of Davin's APL and is a bit "ugly", but as far as 
> I know it is accurate.
> My fmtDate and fmtTime linked to from the Extend Dates Project wiki page are 
> more recent evolutions of dSpell & dTime.
> Ric
>
>> From: Ian Clark
>>
>> I've been watching this thread with a certain amount of awe.
>>
>> Personally I would like to see an accurate J replication of the
>> DATES.w3 package shipped with APL+Win, of which I am a heavy user.
>> It's on my list to do the conversion myself, but I'd be indebted to
>> anyone else doing it first (plus testing it of course). It's getting
>> to the stage where I'd even pay money for it.
>>
>> In view of the bozo bugs shipped by big vendors with their shiny new
>> platforms, I think there's a need for a general-purpose reference
>> date/time package, and I nominate DATES in that role. It is
>> standardised on fractional JDN (Julian Day Number), contains extensive
>> explanations of the algorithms, common conventions and other things
>> you need to consider, and is of astronomical quality, allowing you to
>> handle historical dates with confidence and even choose to increment
>> the date at midday (the astronomer's standard, because they don't like
>> the date changing in the middle of their "working day"); midnight; or
>> 6pm (the ancient standard: strictly at sundown).
>>
>> IMHO, fiddly questions about leap-seconds are far from irrelevant,
>> even to programmers who only want to calculate in whole days.
>> Reference dates are used a lot in this game (eg for applying the
>> Gregorian Reform: different from country to country) and not a few
>> users of dates packages make critical use of .GT. and .LT. -- maybe
>> when they should be using .GE. or .LE. . Therefore handling JDN to the
>> nearest msec is not being "anal". IMO to round-down JDN to an integer
>> is not a decision to disregard time-of-day but a decision to
>> standardise on precise instants when the day increments.
>>
>> Many applications have no need of the time-of-day, but give grief if
>> the date is out by one day. Islamic dates are notorious in this
>> respect, since although the calendar is defiantly moon-based, it
>> relies on actual sightings of the new moon, not on the astronomical
>> moon-phase resetting to zero. So Bradford and Karachi can announce
>> different days for the start of Ramadan. (Homeland Security: please
>> note. ;-)
>>
>> And as for Easter...! -- Kepler had to remind his contemporaries that
>> Easter was a feast, not a planet.
>>
>> My most critical use of DATES.w3 is a generalised date/time converter
>> which I've had under development for years. (There's even rational
>> proposals for time standards on the Moon and Mars). I would trust
>> DATES as the soundest platform on which to handle leap-seconds. Sorry
>> I don't know how well-behaved it is with Chinese dates. The only
>> improvement I'd make to DATES is to perform each conversion to/from
>> JDN not once but three times (+(_1 0 1) seconds) and flag a warning
>> condition if the day changes.
>>
>> Has anyone else experience with DATES.w3? Glitches I don't know about?
>>
>> Ian
>>
>>
>> On Fri, Sep 11, 2009 at 4:38 PM, R.E. Boss <[email protected]> wrote:
>> > I do not know how relevant this is, but it appears to be useful,
>> sometimes.
>> >
>> > NB. from
>> >
>> http://dev.whydomath.org/Reading_Room_Material/ian_stewart/2000_03.html
>> > EasterSunday =: 3 : 0   NB. y is year(s)
>> > A=. 19 | y
>> > 'B C'=. 100 (<....@%~ ,: |) y
>> > 'D E'=. 4 (<....@%~ ,: |) B
>> > G=. <. 25 %~ 13 + 8 * B
>> > H=. 30 | 15 + B + (19*A) - D + G
>> > 'J K'=. 4 (<....@%~ ,: |) C
>> > M=. <. (A + 11 * H) % 319
>> > L=. 7 | 32 + M + (2 * E + J) - H + K
>> > N=. <. (90 + H + L - M) % 25
>> > P=. 32 | 19 + H + L + N - M
>> > |:y,N,:P
>> > )
>> >
>> >   EasterSunday 2000 + i.10
>> > 2000 4 23
>> > 2001 4 15
>> > 2002 3 31
>> > 2003 4 20
>> > 2004 4 11
>> > 2005 3 27
>> > 2006 4 16
>> > 2007 4  8
>> > 2008 3 23
>> > 2009 4 12
>> >   EasterSunday 1000000         NB. from Ian Stewart
>> > 1000000 4 16
>> >
>> >
>> > From the link above " Under the rules of the Gregorian calendar, the
>> cycle
>> > of Easter dates repeats exactly after 5,700,000 years."
>> >
>> >
>> > R.E. Boss
>> >
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> -
>> > For information about J forums see
>> http://www.jsoftware.com/forums.htm
>> >
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to