A strange bug (?) with calendar (from the Scripter's Scrapbook)
Ken Ray
kray at sonsothunder.com
Mon Mar 8 15:08:42 EST 2004
Dom,
It seems to work for me... can you give me a specific month and year
where yours is failing? I'd like to see what you're seeing...
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Dom
> Sent: Monday, March 08, 2004 7:59 AM
> To: use-revolution at lists.runrev.com
> Subject: A strange bug (?) with calendar (from the Scripter's
> Scrapbook)
>
>
> As an exercise, I tested the script given in the Scripter's Scrapbook:
>
> =====
> on mouseUp
> put calendar(Apr,1995) into cd fld "Calendar"
> end mouseUp
>
> function calendar month,year
> put "Sun Mon Tue Wed Thu Fri Sat" into dayHeader
> get (month & " 1, " & year)
> convert it to long date
> put it into currentDate
> delete word 1 of it
> delete word 2 of it
> repeat with i = 1 to (length(dayHeader)-length(it)) div 2
> put " " before it
> end repeat
> put it into monthHeader
> convert currentDate to dateItems
> put item 2 of currentDate into monthNum
> put empty into days
> repeat with dayNum = 1 to (item 7 of currentDate) - 1
> put " " after days
> end repeat
> repeat while item 2 of currentDate is monthNum
> get " " & item 3 of currentDate & " "
> if length(it) is 3 then get " " & it
> if item 7 of currentDate is 7 then get it & return
> put it after days
> add 1 to item 3 of currentDate
> convert currentDate to seconds -- to force next line to reconvert
> convert currentDate to dateItems
> end repeat
> return monthHeader & return & dayHeader & return & days &
> return end calendar ====
>
> I tested also all the months, not only April ;-)
> and I encountered a very strange bug (?):
> in some months, the day 22 is not written in the "calendar"
> field! This seems to be systematic, only in months from April
> to October!
>
> Can you verify on your machine?
> Here Mac OS 10.2.4 / RR 2.1.2
> --
> Vous parlez français ? faites un tour sur le groupe
> francophone ! revolutionfr-subscribe at yahoogroupes.fr
> Jetez un oeil sur RevoBlog <http://revoblog.free.fr> !
> _______________________________________________
> 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