إشعار
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تسجيل الدخول أو تغيير الدلائل.
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تغيير الدلائل.
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 are Day.Sunday, Day.Monday, Day.Tuesday, Day.Wednesday, Day.Thursday, Day.Friday, or Day.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