--- title: "weeknumber()" slug: "date-week-number" updated: 2026-08-13T09:03:53Z published: 2026-08-13T09:03:53Z canonical: "docs.lobstersoftware.com/date-week-number" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # weeknumber() This function returns the number of the week in the year of a given date **a**. ## Parameters | Parameter | Description | | --- | --- | | a | Date | | b | (optional) Locale. Default: System Locale. **NOTE:** Use the three dots to select a value. | ## Examples | Parameter a | Parameter b | Result | | --- | --- | --- | | 2021-10-04 | de_DE | 40 | | 2021-10-04 | en_US | 41 |