CalendarSyntaxeCalendar(the_month, the_year) Crée un calendrier mensuel. Les paramètres sont au format nombre, le résultat est au format texte. Par Fredo d;o) ExempleCalendar(10, 2002) ---> " Octobre 2002 Lun Mar Mer Jeu Ven Sam Dim 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31" Scripton Calendar(the_month, the_year) set days_Uk to "MonTueWedThuFriSatSun" set List_Mois_Fr to {"Janvier", "Février", "Mars", "Avril", "Mai", ¬ "Juin", "Juillet", "Aožt", "Septembre", "Octobre", "Novembre", "Décembre"} set List_num_Mois to {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} set Infos_Cal to ("" & tab & (item the_month of List_Mois_Fr) & " " & the_year & return & ¬ tab & "Lun" & tab & "Mar" & tab & "Mer" & tab & "Jeu" & ¬ tab & "Ven" & tab & "Sam" & tab & "Dim" & return) as text set day_week to (weekday of (date ("1/" & the_month & "/" & the_year))) set num_day_week to (offset of (text 1 thru 3 of (day_week as text)) in days_Uk) div 3 + 1 set num_day to item the_month of List_num_Mois if (the_month is 2) and ((the_year mod 4) is 0) then set num_day to 29 set {num_day, num_day_text, the_Cal, num_loop} to ¬ {0, tab, {}, (num_day_week + num_day - 1)} repeat with the_loop from 1 to num_loop if (the_loop e" num_day_week) then set num_day to num_day + 1 if (num_day > 0) then set num_day_text to (tab & num_day) as text if (the_loop > 1) and (the_loop < num_loop) and ((the_loop mod 7) = 0) then ¬ set num_day_text to (num_day_text & return) set end of the_Cal to num_day_text end repeat return (Infos_Cal & the_Cal) as text end Calendar
RemarqueUtilise num_week.
|