הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Syntax
Date.WeekOfYear(dateTime as any, optional firstDayOfWeek as nullable number) as nullable number
About
Returns a number from 1 to 54 indicating which week of the year the date, dateTime, falls in.
dateTime: Adatetimevalue for which the week-of-the-year is determined.firstDayOfWeek: An optionalDay.Typevalue that indicates which day is considered the start of a new week (for example,Day.Sunday). If unspecified, a culture-dependent default is used.
Example 1
Determine which week of the year contains March 27th, 2011.
Usage
Date.WeekOfYear(#date(2011, 03, 27))
Output
14
Example 2
Determine which week of the year contains March 27th, 2011, using Monday as the start of the week.
Usage
Date.WeekOfYear(#date(2011, 03, 27), Day.Monday)
Output
13