diffdays

Terry Vogelaar terry at discovery.nl
Wed Jul 17 23:25:01 EDT 2002


Sims:
> I changed it as follows but it still puts 730 days.
> 7/17/1900  to  7/17/2002  is a bit more days than that.

Peter:
> you uncovered a bug.
> it is easier to try the following, using Script Debug Mode.
> 
> on mouseUp
>   put "17.7.1901" into dateA
>   convert dateA from short system date to dateItems
> end mouseUp
> 
> and see 2001,7,17,2,0,0,3 .

The problem in both cases is that the input is not 'correct'. A short date
has only two digits for the year: 7/17/01. Using the CenturyCutOff property,
you can determine when you mean 1901 or 2001. Conclusion: only use a short
date when it's about the recent past or the near future. Or should RunRev
add another date format: the NotQuiteShort date, or shall we call it: the
MillenniumBugProofShort date, or the YearExpressedInFourDigitsKindaShort
date.

Terry





More information about the Use-livecode mailing list