Contact

Collabora Office WEEKNUM_EXCEL2003: January 1 Week Numbering

Date and Time Intermediate Collabora Office Calc

WEEKNUM_EXCEL2003, historically documented as WEEKNUM_ADD, uses the January-1 week. Understand Sunday/Monday modes and differences from ISO numbering.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

WEEKNUM_EXCEL2003 labels a date with a week number using a compatibility convention. Its defining rule is that week 1 contains January 1. The choice of week-start day is separate from that first-week rule. Using Monday alone is not enough to identify a week-numbering system.

Syntax and modes

WEEKNUM_EXCEL2003(Date; ReturnType)

Both arguments are required in this interface. Use a numeric date, preferably produced with DATE. Mode 1 starts weeks on Sunday; mode 2 starts them on Monday. The exact evaluator selects Sunday only when the converted mode equals 1; other supported integer values follow its Monday branch. The mode-0 example below demonstrates that branch from source, not a recommendation to use undocumented codes. Prefer 1 or 2 for readable workbooks.

The add-in calculates days since January 1, adds the weekday offset of that January 1 relative to the chosen week start, divides by seven and adds one. It does not change January’s first few dates into the previous year’s final week. This is not the ISO first-week rule, even in Monday mode.

Date and ReturnType pass through signed-32-bit integer argument conversion. There is no separate return-type whitelist in this evaluator: values other than 1 take the Monday branch. This does not mean that modern WEEKNUM codes such as 21 retain their modern meaning here.

Reproduce the year-boundary examples

Enter each formula as written, keeping the DATE construction and mode visible. Results below are independent Gregorian calculations checked against the pinned evaluator.

Formula Source/math result
=WEEKNUM_EXCEL2003(DATE(2021;01;01);1) 1
=WEEKNUM_EXCEL2003(DATE(2021;01;01);2) 1
=WEEKNUM_EXCEL2003(DATE(2021;01;03);1) 2
=WEEKNUM_EXCEL2003(DATE(2021;01;03);2) 1
=WEEKNUM_EXCEL2003(DATE(2021;01;04);2) 2
=WEEKNUM_EXCEL2003(DATE(2018;12;31);2) 53
=WEEKNUM_EXCEL2003(DATE(1995;01;01);1) 1
=WEEKNUM_EXCEL2003(DATE(1995;01;01);2) 1
=WEEKNUM_EXCEL2003(DATE(2021;01;01);0) 1

January 1, 2021 is always week 1 under this rule. The next Sunday, January 3, starts week 2 in Sunday mode; Monday mode remains in week 1 until January 4. December 31, 2018 is week 53 in Monday mode rather than week 1 of the following year. These are intentional consequences of the January-1 convention.

A week number alone is not a unique date label. The function returns a number, not a formatted year-week identifier or a week-start date.

Practical reporting choice

Suppose a weekly report contains January 1, January 3 and January 4, 2021. First choose whether the report follows Sunday or Monday weeks, then decide whether the organization uses a January-1 or January-4 first-week rule. Keep that rule in the report’s column heading or model notes. Two formulas may agree throughout much of the year and still disagree exactly where annual totals are reconciled.

For cross-year grouping, retain an actual week-start date or a correctly derived week-year alongside the week number. Do not concatenate the calendar YEAR with an ISO-style week number without handling dates assigned to the neighboring week-year. A consecutive sequence of week numbers is also unsuitable for calculating elapsed weeks across December and January; use dates for durations.

Errors, conversions and alternatives

Supply both arguments and keep the mode explicit. An out-of-range mode conversion can fail before the week algorithm runs; no localized runtime error display is asserted here. Use DATE rather than an expression such as 2021-1-1, which is arithmetic subtraction, and avoid ambiguous text dates or unexplained serial origins.

Modern WEEKNUM offers more numbering systems. ISOWEEKNUM is clearer when the desired rule is specifically Monday weeks with the January-4 first week. Do not mechanically replace one compatibility name with another without checking boundary dates and its argument contract.

The help records the historical spelling WEEKNUM_ADD before release 5.1. That history is useful when reading older documentation; this guide does not claim that WEEKNUM_ADD is an accepted current formula alias. The current identity is WEEKNUM_EXCEL2003.

Compatibility, lifecycle and evidence

This guide covers the new Collabora Office desktop for Linux, using the vendor-identified source for Flathub tag coda-26.04.4.3-1, commit 81339d176148d0d5c81ff05d82540f58f8aaa117, and official Help 26.04 checked October 18, 2026. Examples are independently calculated and checked against that source; they have not been executed in Collabora Office or another calculation engine. Display formatting and import/export round trips are untested. This evidence does not establish parity with Classic, Online/CODE, mobile, Windows or macOS.

The function remains documented and implemented in this snapshot. Compatibility status is not proof of retirement or formal deprecation. Its first introduction in this new desktop product is not established by the cited material.

References