firstDayOfWeek

Calculates the first day of the week containing the given date.

Syntax

firstDayOfWeek(date, weekStart)

Parameters

date

Specifies the date variable.

weekStart

Specifies a number representing the day used as the first day of the week: 1 = Sunday, 2 = Monday . . . 7 = Saturday.

Returns

Returns a date value representing the day that begins the week containing the date passed in.