Bonjour Zryip,
Le 27 févr. 10 à 20:21, zryip theSlug a écrit :
…
…
To fix this bug, replace the pad part by this new portion:
-- Pad beginning with empty days:
put createDate(tYear,tMonthNumber,1) into tStartDay
convert tStartDay to dateitems
get last item of tStartDay
if (pFirstDayWeek is "Monday") then
if (it = 1) then
put 6 into tPad -- fix the case that the day is Sunday (value
1) - 2 = - 1
else
put (it - 2) into tPad
end if
else
put (it - 1) into tPad
end if
repeat for tPad
put " " after tCal
end repeat
Nice! all is OK now
…
…
Now a little trick with my code. It could give you free times if you
have missed it ;)
You are really considerate ;-))
How to create an easy loop to add months:
put createDate(2010,1,1) into tStartDate -- Create the January, 1 2010
in your local language system
repeat with tMonthNumber = 0 to 11 -- Create months for January (1) to
December (12)
put cal(addToDate(tStartDate,0,tMonthNumber,0),"Monday") & cr
after fld "MyField"
end repeat
Thanks a lot. That's working like a charm. The 12 months are created
very fast. Magnifique! (table or lines as well :-))
I am doing trials to improve my "in lines" layout : I think I will
keep only one line for the days of weeks at the top of the field and I
will isolate the months' names in an extra field on the left (to avoid
that a month'name be selected when dragging from the end of a month to
the beginning of the following one.
Have a nice week
Best regards from Grenoble
André
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution