WEEKNUM
Supported, behaves as documentedCategory: Date and time · Last tested 2026-08-06
Real, executed compatibility results for the WEEKNUM function across Microsoft Excel, Google Sheets, and LibreOffice Calc — verified by actually running it. Syntax and links to each vendor’s official documentation are below.
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel | Yes | Not yet | n/a |
| Google Sheets | Yes | Not yet | n/a |
| LibreOffice Calc | Yes | Yes (25.8.7.3, 2026-08-06) | Supported, behaves as documented |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when WEEKNUM’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Supported, behaves as documented | 2026-07-19 |
| 24.8.7.2 | Supported, behaves as documented | 2026-07-19 |
| 25.2.0.3 | Supported, behaves as documented | 2026-07-24 |
| 25.8.7.3 | Supported, behaves as documented | 2026-08-06 |
Executed test cases
LibreOffice Calc 25.8.7.3 (tested 2026-08-06)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =WEEKNUM(DATE(2024,1,1),1) | return_type 1 = US system, weeks start Sunday, week containing Jan 1 is always week 1. Verified via https://support.microsoft.com/en-us/office/weeknum-function-e5c43a03-b4ab-426c-b411-b18c13c75340 | 1 | 1 | Matched |
| =WEEKNUM(DATE(2024,1,1),2) | return_type 2 = same 'week containing Jan 1 is week 1' system, but weeks start Monday | 1 | 1 Jan 1, 2024 happens to BE a Monday, so it is both the week-1-by-Sunday-rule week AND the very first day of the week-1-by-Monday-rule week -- return_type 1 and 2 coincide at 1 for this specific date (see WEEKNUM_doc_example_* below for a date where they genuinely diverge) |
Matched |
| =WEEKNUM(DATE(2012,3,9)) | Microsoft's own documented example date/result for the default return_type (1) | 10 | 10 Per Microsoft docs, WEEKNUM(3/9/2012) = 10 with default return_type |
Matched |
| =WEEKNUM(DATE(2012,3,9),2) | Same date as WEEKNUM_doc_example_default but return_type=2 (Monday-start): Microsoft's own docs show this returns a DIFFERENT week number (11, not 10) for the identical date -- the genuine return_type divergence | 11 | 11 Per Microsoft docs, WEEKNUM(3/9/2012,2) = 11, one more than the return_type=1 result of 10 |
Matched |
| =WEEKNUM(DATE(2023,1,1),21) | return_type 21 uses 'System 2': the week containing the year's first Thursday is week 1 (ISO 8601), a genuinely different algorithm from return_types 1/2/11-17 (all of which use 'week containing Jan 1 = week 1'). This should match ISOWEEKNUM(DATE(2023,1,1)) exactly -- see ISOWEEKNUM.json | 52 | 52 Jan 1, 2023 is a Sunday; under the ISO rule it falls in the LAST ISO week (52) of 2022, not week 1 of 2023 |
Matched |
Docs & syntax
- Excel: official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation