Function Week() Foundation

Calculates the calendar week from a date.

Syntax
Week( [<dDate>], [<lSundayIsFirstDayOfWeek>] ) --> nWeekOfYear
Description

This function returns the calendar week of a given date. It works according to DIN1355, but the first day of the week can be either Monday or Sunday. This depends on SET DATE TO: If the day-month-order of the date format was set to month-day, the Sunday is used as the first day of the week, Monday otherwise.

<dDate>

The default value for this optional parameter is the current date.

<lSundayIsFirstDayOfWeek>

Overrides the default setting inherited by SET DATE TO: If .T. is passed, the Sunday is used as the first day of the week, Monday if .F..

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.