>-- Original-Nachricht -- >Subject: Re: diffdays >From: Terry Vogelaar <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >Date: Thu, 18 Jul 2002 06:22:16 +0200 > > >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
No, that's not the problem. There's a bug. Additionally, dateItems sets midnight to 2 AM which is also a bug. 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 _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
