ISOWEEKNUM Function in ONLYOFFICE: Syntax, Week-Date Examples and Troubleshooting
Calculate ISO week numbers correctly at year boundaries, explain ISO week-years and flag a vendor documentation discrepancy.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
ISOWEEKNUM in ONLYOFFICE Spreadsheet Editor
Quick answer
ISOWEEKNUM returns the ISO-style week number of a date. In the official English reference, write =ISOWEEKNUM(date). Example: =ISOWEEKNUM(DATE(2021,1,1)) independently predicts 53, because January 1, 2021 is in the last ISO week of 2020. ONLYOFFICE’s reference documents one required argument. No native spreadsheet execution was performed for this result.
What makes an ISO week different?
ISO weeks begin on Monday. Week 1 contains the year’s first Thursday (equivalently January 4). Thus the ISO week-year can be one year earlier or later than the date’s calendar year near New Year. ISOWEEKNUM provides only the numeric week, not its ISO week-year. A label such as “2021-W53” is wrong for January 1, 2021; the intended ISO label is 2020-W53.
Exact documented syntax and argument types
=ISOWEEKNUM(date)
| Argument | Required? | Description | Default |
|---|---|---|---|
date |
Yes | Date serial, a reference to a cell containing a date, or the result of a date/time function such as DATE | No omission default |
There are no optional parameters in the vendor’s documented signature. Do not add a return_type argument: that belongs to WEEKNUM, not ISOWEEKNUM. ONLYOFFICE ISOWEEKNUM; ONLYOFFICE WEEKNUM.
Documentation discrepancy to review: the ONLYOFFICE ISOWEEKNUM page says it returns between 1 and 54. Under the independently checked ISO 8601 calendar model, a week-number year has 52 or 53 weeks. Do not silently correct the vendor’s claim or assert what its formula engine does; flag the vendor wording for documentation review and validate boundary inputs natively. The worked examples here use the calendar definition (1–53), labelled expected only.
Reproduce the inputs in a sheet
Enter the dates in A2:A13 using DATE formulas. A2 is =DATE(2019,12,30); use the other dated rows below in the same format. In C2 enter =ISOWEEKNUM(A2) and fill down. B holds the calendar weekday for clarity. D records the independently determined ISO week-year, not a claimed native formula result. E shows =WEEKNUM(A2) to demonstrate why System 1 reports can differ.
| Date in A | Calendar day (independent) | ISO week / WEEKNUM(A,21) | ISO week-year | WEEKNUM(A,1) |
|---|---|---|---|---|
| 2019-12-30 | Monday | 1 | 2020 | 53 |
| 2020-01-01 | Wednesday | 1 | 2020 | 1 |
| 2020-12-31 | Thursday | 53 | 2020 | 53 |
| 2021-01-01 | Friday | 53 | 2020 | 1 |
| 2021-01-03 | Sunday | 53 | 2020 | 2 |
| 2021-01-04 | Monday | 1 | 2021 | 2 |
| 2024-01-01 | Monday | 1 | 2024 | 1 |
| 2024-12-29 | Sunday | 52 | 2024 | 53 |
| 2024-12-30 | Monday | 1 | 2025 | 53 |
| 2025-01-01 | Wednesday | 1 | 2025 | 1 |
| 2026-01-01 | Thursday | 1 | 2026 | 1 |
| 2026-10-11 | Sunday | 41 | 2026 | 42 |
All week numbers and week-years were independently calculated with Python datetime.date.isocalendar(); a separate System 1 calculation was checked against %U for the default WEEKNUM comparison. Native ONLYOFFICE results were not observed or recorded. The CSV in this batch contains exact inputs and expectations.
Useful formulas with independently checked expectations
1. ISO week belonging to a previous ISO year. =ISOWEEKNUM(DATE(2021,1,1)) predicts 53, and the correct ISO year is 2020. The calendar YEAR of that date is 2021. This distinction is critical for cross-year charts.
2. ISO week belonging to a following ISO year. =ISOWEEKNUM(DATE(2024,12,30)) predicts 1, and its ISO year is 2025. This does not mean the date moved into January.
3. A predictable week 1. =ISOWEEKNUM(DATE(2024,1,1)) predicts 1. The first of January 2024 was Monday; this is also the start of the first ISO week.
4. Compare two official functions. In one workbook, =WEEKNUM(DATE(2021,1,1),21) should be checked against =ISOWEEKNUM(DATE(2021,1,1)). Independent ISO arithmetic predicts 53 for each, while =WEEKNUM(DATE(2021,1,1),1) independently predicts 1. Agreement between ISO functions is a proposed native test, not an observed application result.
5. ISO week-year as a companion calculation. A formula to test in ONLYOFFICE is:
=YEAR(A2-WEEKDAY(A2,2)+4)
For A2=2021-01-01, expected 2020; for A2=2024-12-30, expected 2025. This uses the Thursday of the ISO week to determine the week-year. YEAR and WEEKDAY are separately documented vendor functions; the combined expression’s result was independently checked by Python, not by ONLYOFFICE.
6. ISO reporting key (year plus week). After validating the above on your installed build, a numeric key can be generated with:
=YEAR(A2-WEEKDAY(A2,2)+4)*100+ISOWEEKNUM(A2)
Expected key for 2021-01-01: 202053; for 2024-12-30: 202501. If you need a label with a leading zero, formatting such as 2025-W01 requires a separate format rule; the numeric key itself is 202501.
Real-world issue: annual aggregation
Grouping transactions by YEAR(date) and ISOWEEKNUM(date) introduces mismatched years near New Year. For example, a record dated December 30, 2024 should be grouped with ISO-year 2025 week 1, not calendar-year 2024 week 1. If an export has only ISO week number and no ISO year, a later analyst cannot unambiguously recover the period. Store date, ISO week-year and ISO week together in the reporting data.
Errors, edge cases and test limitations
| Issue | Diagnostic action |
|---|---|
| First few January dates show week 52 or 53 | This can be correct under ISO; inspect the ISO week-year. |
| A late-December date shows week 1 | It may belong to the next ISO week-year. |
| Vendor text says 54 while calendar math expects max 53 | Treat as a documentation discrepancy, not proof of a runtime bug. Native boundary tests are needed. |
| Text date differs between computers | Replace with a numeric DATE input; confirm region and workbook date system. |
| Invalid date produces an error | Exact ONLYOFFICE error codes and date-range behaviour were not observed. Do not copy Excel error behaviour as fact. |
Comparing ISOWEEKNUM with WEEKNUM |
Use return_type=21 for the ISO comparison; default WEEKNUM uses Sunday-start System 1. |
Compatibility and version matrix status
Microsoft Excel documents ISOWEEKNUM(date) and the ISO concept. That establishes reference-level syntax overlap, not tested cross-program equivalence, date-system equality or support in older builds. ONLYOFFICE’s unversioned help does not give a first-supported Docs release, specific Desktop release, mobile coverage or exact error semantics. Do not infer a universal compatibility promise. The localized formula name may differ from English, and dates rendered as 01/02 can parse differently by Region.
Product scope, regional settings and test status
These examples use the English, unversioned ONLYOFFICE Spreadsheet Editor help as accessed October 11, 2026. That establishes documented function names and parameters, but does not establish a minimum supported Docs web edition, a minimum Desktop Editors build, or mobile editor parity. There is no running ONLYOFFICE editor in this research environment. None of the results on this page was observed in ONLYOFFICE. The tables are independently calculated predictions for someone to reproduce and verify in a real build.
- Docs / web: the vendor documents this function in its general Spreadsheet Editor reference, but this batch did not test a particular server version, integration or browser.
- Desktop: Desktop Editors have a separate release history and were not executed. Do not describe the results as Desktop-tested.
- Mobile / older releases: support and recalculation behaviour are not established by the undated help page. Check the function picker on the exact target build.
- Formula names and arguments: in the English reference, formulas use English names, commas to separate arguments, and parentheses. Advanced Settings has a Formula Language option; verify localized names and separators before copying examples into another locale. The comma notation is only guaranteed as the documented English form, not as universal pasted syntax.
- Date presentation: enter dates with
=DATE(year,month,day)or explicit typed date cells. Region can affect displayed date order and interpretation of pasted date text. Avoid"01/02/2026"as an ambiguous text date. The vendor also documents an optional 1904 date system, so do not mix serial-number literals between imported workbooks without checking the date system. - Recalculation: if recalculation is unexpected, check the application’s calculation and workbook settings; no recalculation performance was tested.
Sources: ONLYOFFICE Insert Functions, ONLYOFFICE Advanced Settings.
Official reference and verification
- ONLYOFFICE Spreadsheet Editor — function documentation
- ONLYOFFICE WEEKNUM
- ONLYOFFICE Insert Functions
- ONLYOFFICE Advanced Settings
- ONLYOFFICE WEEKDAY
- ONLYOFFICE DATE
- ONLYOFFICE YEAR
Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in ONLYOFFICE Spreadsheet Editor.
- No genuine ONLYOFFICE Spreadsheet Editor screenshots are included; this guide does not use mock application images.