The seconds problem
Sarah Reichelt
sarahr at genesearch.com.au
Thu Apr 15 19:48:51 EDT 2004
The problem here is with the first convert. It assumes the original
date is in US format. This doesn't matter the first time as day & month
are both 1, but the second time through the loop, it looks like you
have day 1, month 2. Thereafter things gets really messed up as it
keeps switching back & forth between formats. The solution is to change
the first convert command to say:
convert aDate from short system date to dateItems
or before you start the loop, set the useSystemDate to true.
Cheers,
Sarah
On 16 Apr 2004, at 9:40 am, Mark Smith wrote:
> I think there's something a bit odd about Revs date and time handling.
> I'm in the UK, and have OS X set to use the european date format.
> Below is just plain weird.
>
> US date version - no problem
> on mouseUp
> put "1/1/04" into aDate
> repeat 100
> put aDate & return after dList
> convert aDate to dateItems
> add 1 to item 3 of aDate
> convert aDate to short date
> end repeat
> put dList into fld 1
> end mouseUp
>
> produces this:
> 1/1/04
> 1/2/04
> 1/3/04
> 1/4/04
> 1/5/04
> 1/6/04
> 1/7/04
> 1/8/04
> 1/9/04 etc.
>
> However,
>
> european date version - no good at all
> on mouseUp
> put "1/1/04" into aDate
> repeat 100
> put aDate & return after dList
> convert aDate to dateItems
> add 1 to item 3 of aDate
> convert aDate to short system date
> end repeat
> put dList into fld 1
> end mouseUp
>
> produces this:
> 1/1/04
> 02/01/04
> 02/02/04
> 03/02/04
> 03/03/04
> 04/03/04
> 04/04/04
> 05/04/04
> 05/05/04
> 06/05/04
> 06/06/04...
>
>
> ???????
>
> Mark
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
More information about the use-livecode
mailing list