advent calendar, bags, advent season, christmas decoration, christmas, gifts, greeting card, surprise, pay, packaging, merry christmas, advent, advent calendar, advent calendar, advent calendar, advent calendar, advent calendar. Should the holiday calendar live in a spreadsheet or a service?
Photo by congerdesign on Pixabay

Reviews

Should the holiday calendar live in a spreadsheet or a service?

Where a working-day calendar should live, the date contract between sheet and service, and a sixteen-case parity suite pinned to NETWORKDAYS and the Nager.Date API.

This is an editorial pen name used by the publication, not a claim of an independently verified personal identity. Original editorial credit: Review Desk.

A spreadsheet and a service can both count working days correctly. They still disagree in practice, and the cause is almost never the arithmetic. It is a convention one side applied and the other did not: whether both ends count, which dates are closed, and whether a holiday is stored on its own date or on the day it is observed. This page says where the calendar should live, what a date must look like when it moves between the two, and gives a sixteen-case suite that proves they agree.

What to take away

  • Editorial suggestionkeep one dated closure list with an id and a version. Load that same version into the sheet and into the service, and echo it in every answer.
  • Send dates between the two as YYYY-MM-DD text. Convert to a serial only inside the sheet.
  • Excel's NETWORKDAYS counts both ends. Google documents the same arguments but not the endpoint rule, so pin it in a test.
  • The Nager.Date API returned United States holidays in two different ways when checked on 26 October 2026. Its v3 endpoint put Juneteenth 2027 on Friday 18 June (the observed date), and its v4 endpoint put it on Saturday 19 June (the actual date). The two give different working-day counts.
  • Editorial suggestionmove from a sheet to a service when several people compute the same kind of date, or when the answer must land in another system's record.

What each tool class is for

QuestionSpreadsheetService
One person needs one date, nowYesOverkill
Several people need the same kind of dateEach copy driftsOne calendar, one convention
The date belongs to a record in another systemNoYes
The answer must be reproduced months laterOnly if the closure tab is versionedYes, if the calendar is versioned
Someone must audit the workingYes, the formula is visibleOnly if the response echoes its inputs

This table is the desk's own judgement and not a vendor claim. Editorial suggestion: if a single workbook is the only consumer, stay in the sheet.

The sheet side is documented well. Microsoft's NETWORKDAYS and NETWORKDAYS.INTL both take a start, an end and an optional holiday range; the second adds a weekend argument. Google Sheets has a NETWORKDAYS with the same shape and says only Saturday and Sunday count as the weekend; for other weekends it points to NETWORKDAYS.INTL. Neither sheet knows anything about your closures until you supply them.

The date contract

A sheet stores a date as a number. Microsoft documents that by default 1 January 1900 is serial number 1. Google's Sheets API says serial numbers count days from 30 December 1899, with the time of day as the fraction. The serial and epoch detail, including the 1904 system, is in Excel date serials and the 1900 and 1904 epochs.

A service sends text. RFC 3339 defines full-date as year, month and day with hyphens, and a date-time that always carries a Z or a numeric offset. Editorial suggestion, a rule that survives every boundary:

  • Send a plain date as 2027-03-05. Never send a moment where a date is expected, and never a bare serial.
  • Send a moment only when hours matter, with an offset.
  • Convert to a serial inside the sheet with DATE, and keep closure dates as real date values. Microsoft says text dates can cause problems and that an invalid date makes NETWORKDAYS return #VALUE!.

The failure modes of each crossing are collected in spreadsheet and API tools: common mistakes. The formula behind a date difference is in the days-between-dates formula.

A request that carries everything

Editorial suggestion: a service whose request states every assumption, and whose response echoes them, can be swapped or audited without changing the answer. This shape is the desk's own, not a standard.

request
  operation:     between | add | subtract
  start:         2027-03-01
  end:           2027-03-08
  weekend:       "0000011"            (Monday to Sunday, 1 = rest day)
  calendar:      { id: "us-federal-observed", version: "opm-2026-10-25" }
  start_counts:  true
  end_counts:    true

response
  result:        6
  skipped:       [ dates passed over ]
  applied:       { weekend, calendar, start_counts, end_counts }

The weekend string follows the seven-character form Microsoft documents for NETWORKDAYS.INTL: Monday first, 1 for a non-working day, 0000011 for Saturday and Sunday. Carrying the calendar id and version in the request is what lets someone answer, six months later, which list produced a date.

What the Nager.Date API actually returns

Nager.Date is an open-source public holiday API. Its documentation describes a path of the form /api/v4/Holidays/{CountryCode}/{Year}, says there are no rate limits, and names no data source or accuracy guarantee. Editorial suggestion: treat it as a convenience feed, not an authority. For United States federal dates the authority is the Office of Personnel Management.

The documentation page describes only the v4 path. The older v3 path, https://date.nager.at/api/v3/PublicHolidays/2027/US, was still answering when checked on 26 October 2026, and the v4 path was https://nagerholidays.com/api/v4/Holidays/US/2027. The two returned the following for the United States and 2027, and three points matter for parity:

  1. Observed versus actual dates.The v3 path returned 18 June, 5 July and 24 December, the dates OPM lists as observed. The v4 path returned 19 June, 4 July and 25 December, the dates on which the holidays fall. All three are weekend dates, so a sheet that loads v4 as-is stops removing a weekday on 18 June, 5 July and 24 December.
  2. Filtering.Each response carries 17 rows, including state-level observances. Filtering to national holidays (global true in v3, nationalHoliday true in v4) of type Public or Bank gave eleven dates. Filtering those on type Public alone gave ten, because Columbus Day is listed as Public only for some states and as a national Bank holiday.
  3. Year edges.The v3 response for 2028 included 31 December 2027, the observed New Year's Day, which OPM also lists in its 2028 table. The v4 response for 2028 listed 1 January 2028, a Saturday. A harness that requests only the year of the span misses 31 December 2027 in both cases.

After filtering v3 to its national rows, the eleven dates match OPM's 2027 table. That is the check to run whenever the feed changes: compare the set of dates with the publisher's, not just the count.

The pinned conventions

Before any case can have an expected value, fix four things and write them at the top of the suite:

  1. Both ends of a range count.
  2. Saturday and Sunday are the rest days.
  3. Closures are an explicit list of dates with an id and a version. Here the list is the eleven observed dates in OPM's 2027 schedule: 1 January, 18 January, 15 February, 31 May, 18 June, 5 July, 6 September, 11 October, 11 November, 25 November and 24 December.
  4. Every date travels as ISO text.

Sixteen parity cases

Run each through the sheet formula =NETWORKDAYS(start, end, Closures) and through the service, using the same list. Expected values were worked out by counting days one by one, not taken from either implementation. Dates are in 2027 unless stated.

#CaseStartEndClosuresExpect
1Ordinary weekMon 1 MarMon 8 Marnone6
2Across a weekendFri 5 MarMon 8 Marnone2
3Weekend onlySat 6 MarSun 7 Marnone0
4One open dayFri 5 MarFri 5 Marnone1
5One rest daySat 6 MarSat 6 Marnone0
6Whole monthMon 1 MarWed 31 Marnone23
7ReversedMon 8 MarMon 1 Marnone-6 or an error
8Whole year1 Jan31 Decnone261
9Whole year, closed1 Jan31 Decthe eleven250
10Observed dateThu 17 JunMon 21 Junthe eleven2
11Actual dateThu 17 JunMon 21 Jun19 Jun in place of 18 Jun3
12Sunday holidayFri 2 JulTue 6 Julthe eleven2
13Saturday holidayThu 23 DecMon 27 Decthe eleven2
14Duplicate rowFri 8 OctTue 12 Octthe eleven plus 11 Oct again2
15Year edgeThu 30 DecMon 3 Jan 2028the eleven3
16Year edge, addedThu 30 DecMon 3 Jan 2028the eleven plus 31 Dec2

Case 7 has two defensible answers, so pin one. Microsoft's NETWORKDAYS.INTL page says a start date later than the end date gives a negative result whose magnitude is the number of whole workdays; its NETWORKDAYS page is silent on the case. A service that returns 6 has swapped the arguments without saying so. Cases 4 and 5 are the ones that catch an endpoint mismatch, because the conventions differ by the whole answer there rather than by one. Case 14 expects a repeated closure date to be applied once; Microsoft's page does not say so, so run it in your own tool and treat any other result as a finding. Case 11 reproduces the Nager.Date v3 and v4 split, and a service loading v4 unadjusted fails it. Cases 15 and 16 show why the list has to cover the year after the span as well.

Suppose the sheet column returns 6 for case 1 and the service returns 5. The service has left out the end date while NETWORKDAYS includes it. Pin convention 1, re-run, and the suite is green. A disagreement on one row at the edge is the whole purpose of the suite. Re-run it when either side changes, when the closure list changes, and when someone adds a calendar.

When to move from sheet to service

Editorial suggestion, not a vendor rule. Move when more than one person computes the same kind of date, when the date must be written into another system's record, when someone can challenge a result and expect the working back, or when the calendar changes more often than every workbook gets updated. Until then the sheet is the better tool: its formula is visible and the sixteen cases above take minutes to run.

A service does not remove the judgment in the closure list. It moves it to one place. Editorial suggestion: whoever owns the list should record the publisher, the retrieval date and the version, and the layers a deadline may depend on are covered in how country calendars are made. Forward and backward counts have their own edge cases, which are in adding business days.

Sources

Google Docs Editors Help
NETWORKDAYS
[Nager.Date
Public holiday API documentation](https://nagerholidays.com/Api)
[Nager.Date v3 response
US public holidays 2027](https://date.nager.at/api/v3/PublicHolidays/2027/US)
[Nager.Date v4 response
US holidays 2027](https://nagerholidays.com/api/v4/Holidays/US/2027)
[U.S. Office of Personnel Management
Federal holidays](https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/)
[IETF RFC 3339
Date and time on the Internet](https://www.rfc-editor.org/rfc/rfc3339)

In this guide

  1. How dates survive or break moving between Excel, Google Sheets and APIsDate serials, the 1900 and 1904 epochs 1,462 days apart, text dates, Google Sheets locale and time zone, and API formats, with worked values you can check in a sheet.
  2. Spreadsheet Date and Workday Counting MistakesSpreadsheet date and workday-count mistakes: text dates, locale-dependent imports, midnight shifts, serial values, endpoint rules, and closure ranges.

More in Reviews

Latest from Amelia C. Reed