Berserk Docs
Scalar FunctionsDate & Time Functions

week_of_year

Returns the ISO 8601 week number (1-53) of a datetime.

Week 1 is the week that holds the year's first Thursday, so the first days of January can fall in week 52 or 53 of the previous year.

Syntax

week_of_year(date)

Parameters

Prop

Type

Returns: long

Examples

Example 1

print week_of_year(datetime(2024-06-08)) // the week of the Lindisfarne anniversary
print_0 (long)
23

On this page