Nota
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba mendaftar masuk atau menukar direktori.
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba menukar direktori.
Syntax
Date.DayOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as nullable number
About
Returns a number (from 0 to 6) indicating the day of the week of the provided dateTime.
dateTime: Adate,datetime, ordatetimezonevalue.firstDayOfWeek: ADayvalue indicating which day should be considered the first day of the week. Allowed values areDay.Sunday,Day.Monday,Day.Tuesday,Day.Wednesday,Day.Thursday,Day.Friday, orDay.Saturday. If unspecified, a culture-dependent default is used.
Example 1
Get the day of the week represented by Monday, February 21st, 2011, treating Sunday as the first day of the week.
Usage
Date.DayOfWeek(#date(2011, 02, 21), Day.Sunday)
Output
1
Example 2
Get the day of the week represented by Monday, February 21st, 2011, treating Monday as the first day of the week.
Usage
Date.DayOfWeek(#date(2011, 02, 21), Day.Monday)
Output
0