skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Week of year
 

Try Corticon Now

Week of year

SYNTAX

<DateTime>.weekOfYear
<Date>.weekOfYear

DESCRIPTION

Returns an Integer from 1 to 52, equal to the week number within the year in <DateTime> or <Date>. A week begins on Sunday and ends on Saturday. When a year ends between Sunday and the next Friday, or in other words when a new year begins between Monday and the next Saturday, the final day(s) of December will be included in week 1 of the new year. For example, 12/29/2013 fell on a Sunday, so 12/29-31 are included in week 1 of 2014.

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

RULESHEET EXAMPLE

The following Rulesheet uses .weekOfYear to assign a value to integer1.

SAMPLE TEST