<pre>-- create a calendar, given a month and year.function calendar month,year  put "Sun Mon Tue Wed Thu Fri Sat" into dayHeader  convert (month & " 1, " & year) 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 space 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    repeat 4 times    put space after days    end repeat  end repeat  repeat while item 2 of currentDate is monthNum    get space & item 3 of currentDate & space    if length(it) is 3 then get space & 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 & returnend calendarYou need to discard the calendar function (above) because1.) it is dependent upon the users date settings2.) it is limited to dates after 19143.) it calls convert too muchHere is a nicer function which makes calenders from year 2 to 9999, allows the user to begin the week day on any day they choose, is not dependent upon the users date settings, and does input error checking w/messages.function calendar month,year,dayStart  -- This function returns a string which when put into a field  -- formated with a monospace font and is 28 char wide and 7 lines in  -- height displays a month of the calendar.  --  -- month is the month  -- year is the year  -- dayStart is the day you want the calendar to begin with  -- 1 or nothing is Sunday  -- 2 is Monday  -- 3 is Tues  -- and so on up to and including 7 which is Sat  --    if not(month>0 and month<13) then return "INVALID MONTH"  if not(year>1 and year<10000) then return "INVALID YEAR"  if dayStart="" then put 1 into dayStart  if dayStart is not a number then return "INVALID DATE START"  if dayStart >0 and dayStart<8  then    put "Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat" into dayList    put 1 into j      repeat with i = dayStart to dayStart+6        put word i of dayList&" " into word j of dayHeader        add 1 to j      end repeat  else      return "INVALID DATE START"  end if  convert year&","&month&",1," to dateItems  put it into currentDate  put currentDate into anotherDate  put "1995" into item 1 of anotherDate  convert anotherDate to long date  repeat until length(year)=4    put "0"&year into year  end repeat  get word 2 of anotherDate  repeat with i = 1 to (length(dayHeader)-(length(it)+length(year)+1)) div 2    put space before it  end repeat  put it&&year&return into month  convert currentDate to dateItems  put item 7 of currentDate-dayStart into index2  put currentDate into anotherDate  put 1 into item 3 of anotherDate  add 1 to item 2 of anotherDate  convert anotherDate to seconds  subtract 24*60*60 from anotherDate  convert anotherDate to dateItems  put item 3 of anotherDate into numberOfDaysInMonth  put 1 into index1  put char 1 to index2*4 of "                              " into day  add 1 to index2  repeat    if length(index1)="1"    then      put "  "&index1&" " into dayNumber    else      put " "&index1&" " into dayNumber    end if    put dayNumber after days    add 1 to index1    add 1 to index2    if index1>numberOfDaysInMonth then exit repeat    if index2 > 7    then      put return after days      put 1 into index2    end if  end repeat  return month&dayHeader & return & daysend calendarIn addition this handler can be easily converted to putting dayNumber into fields for a calendar on a card where each day is a fld or each day islabeled by a fld.====Second, my "calendEr" handler, with comments:=====function calender month,year,dayStart  if not(month>0 and month<13) then return "Mois incorrect"  if not(year>1 and year<10000) then return "Annee incorrecte"  if dayStart="" then put 2 into dayStart -- 1st weekday is Monday in Europe  if dayStart is not a number then return "Jour de la semaine incorrect"  if dayStart >0 and dayStart<8  then    put "Di Lu Ma Me Je Ve Sa Di Lu Ma Me Je Ve Sa" into dayList -- modified for a French System    put 1 into j    repeat with i = dayStart to dayStart+6      put " " & word i of dayList & " " into word j of dayHeader -- 2 spaces for 2 letters day names (1 before, 1 after)      add 1 to j    end repeat  else    return "Jour de la semaine incorrect"  end if  convert year & "," & month & ",1," to dateItems  put it into currentDate  put currentDate into anotherDate  put "1995" into item 1 of anotherDate  convert anotherDate to long date  repeat until length(year)=4    put "0" & year into year  end repeat  get word 3 of anotherDate -- word 2 is the day on an european System!  repeat with i = 1 to (length(dayHeader)-(length(it)+length(year)+1)) div 2    put space before it  end repeat  put it && year & return into month  convert currentDate to dateItems  put item 7 of currentDate-dayStart into index2 -- if dayStart > 1 then one may obtain a negative value for index2, -- that is, a negative weekday!  if index2<0 then put 7+index2 into index2 -- bug correction ;->  put currentDate into anotherDate  put 1 into item 3 of anotherDate  add 1 to item 2 of anotherDate  convert anotherDate to seconds  subtract 24*60*60 from anotherDate  convert anotherDate to dateItems  put item 3 of anotherDate into numberOfDaysInMonth  put 1 into index1  put char 1 to index2*4 of "                              " into days -- error correction : "days", not "day"!  add 1 to index2  repeat    if length(index1)="1"    then      put "  " & index1 & " " into dayNumber -- 2 espaces + 1 espace    else      put " " & index1 & " " into dayNumber -- 1 espace + 1 espace    end if    put dayNumber after days    add 1 to index1 -- index mois    add 1 to index2 -- index semaine    if index1>numberOfDaysInMonth then exit repeat    if index2 > 7 -- semaine complete    then      put return after days      put 1 into index2    end if  end repeat  return month & dayHeader & return & daysend calender===That's all :-)</pre>