- Reference >
- Operators >
- Aggregation Framework Operators >
- Date Aggregation Operators >
- $week (aggregation)
$week (aggregation)¶
-
$week
¶ Takes a date and returns the week of the year as a number between 0 and 53.
Weeks begin on Sundays, and week 1 begins with the first Sunday of the year. Days preceding the first Sunday of the year are in week 0. This behavior is the same as the “
%U
” operator to thestrftime
standard library function.