calendar function anyone ?

Sarah Reichelt sarah.reichelt at gmail.com
Tue Feb 13 15:58:23 EST 2007


> Does anyone know of a function to find out, for instance, which day of
> the
> week was sept. 18th 1918 or which day of week will be dec. 5th 2025 ?
>

If you convert a date to dateItems, it becomes a comma-delimited list
of 7 items. The last one is a number indicating the day of the week.
Then you can use the system weekDayNames to find the day name that
matches that number.

e.g.
put "12/5/2025" into tDate
convert tDate to dateItems
put the last item of tDate into tDayNum
put line tDayNum of the system weekdayNames into tDayName

Cheers,
Sarah



More information about the Use-livecode mailing list