diffdays

peter.fink at tiscali.ch peter.fink at tiscali.ch
Thu Jul 18 09:18:01 EDT 2002


>-- Original-Nachricht --
>To: use-revolution at lists.runrev.com
>From: sims <sims at ezpzapps.com>
>Subject: Re: diffdays
>Reply-To: use-revolution at lists.runrev.com
>Date: Thu, 18 Jul 2002 11:55:44 +0300
>
>
>>sims: it is not a lot of work to do the date conversion by hand. it needs
>>a Switching Year (Schaltjahr) algorithm for calculation of the length
of
>>february, and a list of the length of the months (31,28,31,30,31 etc.).
>>You can even use the partially correct date items to do part of the parsing.
>>
>Peter
>
>Yes, I am sure that it can be calculated (although I had never heard of
the
>Schaltjahr, thank you for telling me about it).
>
>At 22:14 -0700 07/17/2002, Richard Gaskin wrote:
>>Would be nicer to have DateToJulian and JulianToDate functions built into
>>the engine....
>
>I agree with Richard - it would be 'nicer' to be able to do it easier.
>


it is no more than about 20 lines of code, from a parsed date.
and an option on a control card whether to use the RR built-in code or the
application hand-made code. Both are nice and easy.

actually it is better to have the starting days of the months in a list,
i.e. 0,31,59,90,... for a non-switching year, but 0,31,60,91,... for a switching
year.

Peter









More information about the use-livecode mailing list