Skip to content

fix(holidays): read stateCode like the other state utils, and follow the official texts on the open holiday questions - #603

Merged
hyanmandian merged 13 commits into
claude/capitals-regionsfrom
claude/holiday-state-code
Sep 29, 2026
Merged

hyanmandian merged 13 commits into
claude/capitals-regionsfrom
claude/holiday-state-code

Conversation

@hyanmandian

@hyanmandian hyanmandian commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Stacks on #601. The holiday and business day utils ignored a stateCode they did not know and fell back to the national holidays. The worst case was a lower case code: getHolidays({ year: 2024, stateCode: "sp" }) silently left out every São Paulo holiday, and isBusinessDay then counted 9 July as a business day in SP.

getHolidays, isHoliday, isBusinessDay, addBusinessDays, subBusinessDays and differenceInBusinessDays now read stateCode through one internal helper, readHolidayStateCode:

stateCode Before Now
omitted / undefined national holidays only unchanged
"SP" SP holidays unchanged
"sp", " SP " national only (SP dropped) SP holidays, like getStateCapital, getTimezoneByState and the other state utils
"XX", "", "__proto__" national only rejected
not a string (5, null, {}) rejected by all but getHolidays, which returned the national holidays rejected by all six

A rejection uses what each util already returns for bad input (an invalid year, for instance): [] from getHolidays, false from isHoliday and isBusinessDay, and null from the three business day walks. No return type changes, so check:api passes. Rejecting a value that is not the code of a Brazilian state follows the stack's rule that rejecting what the official source says cannot exist is not a breaking change.

The docs (both languages) and the JSDoc of the six utils say so, and note the 2.4.0 behaviour. This item came from the v3 tracking issue #602 and is fixed here instead of being deferred.

Holiday data, from the official texts (41290e7)

A comparison against the Python holidays library left 22 questions open. The primary texts for them were then collected (STF, Planalto, Câmara, and state legislatures, Casas Civis and official gazettes). Each change below cites its text in src/get-holidays/constants.ts.

Change Before Now Source
AP 25/07 (Dia de São Tiago) listed 2012–2018 no entry in any year STF ADI 4820 (20/09/2018, unanimous; trânsito 12/12/2018), ex tunc like ADI 3940 for RO 18/06
National festas of the first republican calendar none 24/02, 03/05, 13/05, 14/07, 12/10 up to 1930 Decreto nº 155-B/1890, Decreto nº 3/1891; dropped by Decreto nº 19.488/1930
Lei nº 108/1935 days none 03/05 in 1936–1938; 16/07 and 12/10 in 1936–1937 Lei nº 108/1935 (DOU 05/11/1935); Decreto-lei nº 486/1938
Weekday general elections before 1998 none 03/10 of 1955 and 1958 ("Eleições gerais"), 1990 and 1994 ("Eleições (primeiro turno)") Lei nº 1.266/1950, art. 1º; Lei nº 2.550/1955, art. 80; the laws that date each election
GO 26/07, 24/10, 28/10 from 2021 / 1988 / 1988 from 1986 Lei GO nº 9.990/1986, art. 254, II (in force 01/03/1986); Lei GO nº 10.460/1988, art. 346, II, original wording
GO 02/11 none GO feriado estadual 1986–2002, when Finados was not national the same two statutes, alínea d
AL 16/09 optional 2020–2023, state from 2024 state from 2011 the calendar decrees label it "(feriado estadual)" (Decreto AL nº 9.215/2010 through 86.020/2022); Lei AL nº 9.358/2024
PE data magna 06/03 optional 2008–2009, state from 2018 adds the first Sunday of March, 2010–2017 (new firstSundayOfMonth date rule) Lei PE nº 13.835/2009; Lei PE nº 16.059/2017
SC Saturday a Saturday 11/08 or 25/11 stayed moves to the Sunday Decreto SC nº 1.460/2018 (11/08/2018, a Saturday, moved to 12/08)
SC 25/11/2004 stayed on the Thursday moves to Sunday 28/11 the ALESC compilation of Lei SC nº 10.306/1996 keeps the clause Lei SC nº 11.213/1999 wrote in
RO 04/01 from 2011 from 1983 Decreto-Lei RO nº 39/1982; Lei RO nº 2.291/2010

Documentation only:

  • the exact date of Lei SC nº 10.306 (26/12/1996);
  • the GO decrees that move 28/10, and RO's one-off move of 04/01/2022;
  • the AC decrees of 2024–2026;
  • the TRT-13 decision on PB 05/08;
  • the AL decree sources.

Left out and documented, pending a text:

  • 03/10/1960: no official text dates the presidential election.
  • 03/10/1996: a municipal election, not held in the DF.

Not modelled, as before: the AC Friday rule, since the 2026 decree still leaves 17/11 in place.

Every change either rejects what an official text says cannot exist or accepts what one documents, so none is a breaking change; check:api holds.

Checklist

  • My commit/PR title follows Conventional Commits.
  • I added or updated tests covering this change.
  • I updated the documentation in both docs/utilities.md and docs/pt-br/utilities.md.
  • npm run check passes locally. These also pass: coverage (100%), Stryker on the changed files (100%), Deno, Bun, check:unused, check:duplication and check:api (no breaking change against 2.4.0).
  • I ran npm run build:llms.
  • This change does not introduce a breaking change: return types are unchanged, and only inputs that are not a state code change result.
  • This change does not add any runtime dependency.

Additional context

Tree-shaking: the six utils grow by 219 to 273 B each, which is the list of the 27 state codes they now check against. There is no size regression.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RLkm9YrtAifc6XCLFVEsdH

… non-state

getHolidays, isHoliday, isBusinessDay, addBusinessDays, subBusinessDays and
differenceInBusinessDays read stateCode through readHolidayStateCode: letter case and
surrounding whitespace are ignored, so "sp" now lists the São Paulo holidays instead of
silently dropping them. Only an omitted (undefined) stateCode means national holidays only;
any other value that is not a state code ("XX", "", a prototype-chain key, a non-string) is
rejected the way each util already rejects bad input: [] from getHolidays, false from
isHoliday and isBusinessDay, null from the business day walks. Return types are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLkm9YrtAifc6XCLFVEsdH
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
brazilian-utils Ready Ready Preview Sep 29, 2026 4:32am UTC

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ac1cbb1e-66bd-470c-9c80-2d1024c61231

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@brazilian-utils/brazilian-utils@603

commit: 1118f19

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Tree-shaking report

✅ No size regression. 7 grew out of 194 exports.

Base Head Δ
Pre-existing exports, all imported 1924.8 KB 1925.5 KB (gzip 356.2 KB) +695 B (+0.0%)
Full import 1924.8 KB 1925.5 KB (gzip 356.2 KB) +695 B (+0.0%)
Exports 194 194 0

What changed (7)

Export Base Head Δ gzip
🟡 getHolidays 7.4 KB 8.4 KB +986 B (+13.0%) 2.9 KB
🟡 isBusinessDay 7.9 KB 8.8 KB +971 B (+12.1%) 3.1 KB
🟡 isHoliday 7.7 KB 8.7 KB +954 B (+12.1%) 3.0 KB
🟡 addBusinessDays 8.6 KB 9.5 KB +930 B (+10.6%) 3.3 KB
🟡 differenceInBusinessDays 8.4 KB 9.3 KB +930 B (+10.8%) 3.3 KB
🟡 subBusinessDays 8.6 KB 9.6 KB +930 B (+10.5%) 3.4 KB
🟡 capitalize 2.4 KB 2.4 KB +4 B (+0.2%) 1.2 KB
All exports (194)
Export Base Head Δ gzip
⚪ GetAddressInfoByCepError 112 B 112 B 0 B 124 B
⚪ GetAddressInfoByCepNotFoundError 205 B 205 B 0 B 145 B
⚪ GetAddressInfoByCepServiceError 204 B 204 B 0 B 143 B
⚪ GetAddressInfoByCepValidationError 203 B 203 B 0 B 144 B
⚪ GetCepInfoByAddressError 112 B 112 B 0 B 124 B
⚪ GetCepInfoByAddressNotFoundError 205 B 205 B 0 B 145 B
⚪ GetCepInfoByAddressValidationError 203 B 203 B 0 B 144 B
🟡 addBusinessDays 8.6 KB 9.5 KB +930 B (+10.6%) 3.3 KB
🟡 capitalize 2.4 KB 2.4 KB +4 B (+0.2%) 1.2 KB
⚪ convertCurrencyToWords 2.0 KB 2.0 KB 0 B 1.0 KB
⚪ convertDateToWords 2.4 KB 2.4 KB 0 B 1.2 KB
⚪ convertLicensePlateToMercosul 527 B 527 B 0 B 363 B
⚪ convertNumberToWords 1.6 KB 1.6 KB 0 B 819 B
🟡 differenceInBusinessDays 8.4 KB 9.3 KB +930 B (+10.8%) 3.3 KB
⚪ formatBoleto 649 B 649 B 0 B 402 B
⚪ formatCEP 470 B 470 B 0 B 334 B
⚪ formatCNPJ 620 B 620 B 0 B 420 B
⚪ formatCPF 521 B 521 B 0 B 365 B
⚪ formatCaepf 487 B 487 B 0 B 344 B
⚪ formatCei 484 B 484 B 0 B 343 B
⚪ formatCep 470 B 470 B 0 B 334 B
⚪ formatCertidao 513 B 513 B 0 B 350 B
⚪ formatCest 474 B 474 B 0 B 337 B
⚪ formatCid10 459 B 459 B 0 B 330 B
⚪ formatCnae 474 B 474 B 0 B 340 B
⚪ formatCnh 517 B 517 B 0 B 361 B
⚪ formatCno 488 B 488 B 0 B 344 B
⚪ formatCnpj 620 B 620 B 0 B 420 B
⚪ formatCns 483 B 483 B 0 B 340 B
⚪ formatCpf 521 B 521 B 0 B 365 B
⚪ formatCurrency 985 B 985 B 0 B 592 B
⚪ formatIban 267 B 267 B 0 B 228 B
⚪ formatIsbn 27.0 KB 27.0 KB 0 B 6.2 KB
⚪ formatLegalNature 470 B 470 B 0 B 337 B
⚪ formatLicensePlate 361 B 361 B 0 B 270 B
⚪ formatNbs 462 B 462 B 0 B 334 B
⚪ formatNcm 475 B 475 B 0 B 338 B
⚪ formatNfeKey 601 B 601 B 0 B 383 B
⚪ formatPassport 187 B 187 B 0 B 174 B
⚪ formatPhone 2.6 KB 2.6 KB 0 B 1.2 KB
⚪ formatPis 521 B 521 B 0 B 365 B
⚪ formatProcessoJuridico 490 B 490 B 0 B 344 B
⚪ formatSuframa 476 B 476 B 0 B 338 B
⚪ formatVoterId 523 B 523 B 0 B 365 B
⚪ generateBoleto 1.4 KB 1.4 KB 0 B 779 B
⚪ generateCNPJ 843 B 843 B 0 B 523 B
⚪ generateCPF 628 B 628 B 0 B 423 B
⚪ generateCep 130 B 130 B 0 B 136 B
⚪ generateCnh 565 B 565 B 0 B 343 B
⚪ generateCnpj 843 B 843 B 0 B 523 B
⚪ generateCpf 628 B 628 B 0 B 423 B
⚪ generateLegalNature 5.0 KB 5.0 KB 0 B 1.6 KB
⚪ generateLicensePlate 266 B 266 B 0 B 227 B
⚪ generatePassport 226 B 226 B 0 B 191 B
⚪ generatePhone 670 B 670 B 0 B 419 B
⚪ generatePis 357 B 357 B 0 B 272 B
⚪ generatePixPayload 4.5 KB 4.5 KB 0 B 2.0 KB
⚪ generateProcessoJuridico 821 B 821 B 0 B 523 B
⚪ generateRenavam 378 B 378 B 0 B 284 B
⚪ generateSuframa 451 B 451 B 0 B 335 B
⚪ generateVoterId 852 B 852 B 0 B 551 B
⚪ getAddressInfoByCep 3.9 KB 3.9 KB 0 B 1.7 KB
⚪ getAreaCodeByMunicipalityCode 165.0 KB 165.0 KB 0 B 52.2 KB
⚪ getAreaCodeInfo 3.1 KB 3.1 KB 0 B 989 B
⚪ getAreaCodesByState 809 B 809 B 0 B 459 B
⚪ getBankByCode 37.8 KB 37.8 KB 0 B 9.2 KB
⚪ getBankByIspb 37.8 KB 37.8 KB 0 B 9.2 KB
⚪ getBanks 37.6 KB 37.6 KB 0 B 9.0 KB
⚪ getBoletoInfo 2.4 KB 2.4 KB 0 B 1.2 KB
⚪ getCbo 117.3 KB 117.3 KB 0 B 29.9 KB
⚪ getCepInfoByAddress 2.0 KB 2.0 KB 0 B 1.0 KB
⚪ getCertidaoInfo 1.0 KB 1.0 KB 0 B 594 B
⚪ getCest 115.5 KB 115.5 KB 0 B 26.1 KB
⚪ getCfop 67.6 KB 67.6 KB 0 B 6.3 KB
⚪ getCid10 988.3 KB 988.3 KB 0 B 123.6 KB
⚪ getCities 153.4 KB 153.4 KB 0 B 49.2 KB
⚪ getClassTrib 50.0 KB 50.0 KB 0 B 9.0 KB
⚪ getCnae 91.6 KB 91.6 KB 0 B 20.0 KB
⚪ getCnpjInfo 964 B 964 B 0 B 542 B
⚪ getCpfInfo 994 B 994 B 0 B 614 B
⚪ getCstIbsCbs 967 B 967 B 0 B 534 B
⚪ getFormatLicensePlate 315 B 315 B 0 B 245 B
⚪ getGtinInfo 821 B 821 B 0 B 558 B
🟡 getHolidays 7.4 KB 8.4 KB +986 B (+13.0%) 2.9 KB
⚪ getIbanInfo 752 B 752 B 0 B 494 B
⚪ getIsbnInfo 26.9 KB 26.9 KB 0 B 6.1 KB
⚪ getLegalNature 5.6 KB 5.6 KB 0 B 1.8 KB
⚪ getLegalNatures 5.1 KB 5.1 KB 0 B 1.6 KB
⚪ getLegalNaturesByCategory 5.6 KB 5.6 KB 0 B 1.9 KB
⚪ getMunicipalities 153.6 KB 153.6 KB 0 B 49.4 KB
⚪ getMunicipalitiesByAreaCode 167.8 KB 167.8 KB 0 B 52.8 KB
⚪ getMunicipality 154.1 KB 154.1 KB 0 B 49.7 KB
⚪ getMunicipalityByCode 153.8 KB 153.8 KB 0 B 49.5 KB
⚪ getNbs 80.6 KB 80.6 KB 0 B 13.1 KB
⚪ getNfeKeyInfo 2.2 KB 2.2 KB 0 B 1.2 KB
⚪ getNfseKeyInfo 2.4 KB 2.4 KB 0 B 1.2 KB
⚪ getPixKeyInfo 2.5 KB 2.5 KB 0 B 1.2 KB
⚪ getPixPayloadInfo 4.6 KB 4.6 KB 0 B 2.1 KB
⚪ getRegions 255 B 255 B 0 B 165 B
⚪ getServiceItem 26.1 KB 26.1 KB 0 B 8.4 KB
⚪ getStateByCep 3.6 KB 3.6 KB 0 B 1.0 KB
⚪ getStateByIbgeCode 2.4 KB 2.4 KB 0 B 700 B
⚪ getStateCapital 1.1 KB 1.1 KB 0 B 707 B
⚪ getStateCodeByName 2.3 KB 2.3 KB 0 B 649 B
⚪ getStateNameByCode 2.2 KB 2.2 KB 0 B 591 B
⚪ getStates 2.2 KB 2.2 KB 0 B 539 B
⚪ getStatesByRegion 2.3 KB 2.3 KB 0 B 602 B
⚪ getTimezoneByState 737 B 737 B 0 B 327 B
🟡 isBusinessDay 7.9 KB 8.8 KB +971 B (+12.1%) 3.1 KB
🟡 isHoliday 7.7 KB 8.7 KB +954 B (+12.1%) 3.0 KB
⚪ isValidBankAccount 5.3 KB 5.3 KB 0 B 2.4 KB
⚪ isValidBoleto 1.6 KB 1.6 KB 0 B 892 B
⚪ isValidCEP 163 B 163 B 0 B 163 B
⚪ isValidCNPJ 796 B 796 B 0 B 447 B
⚪ isValidCPF 500 B 500 B 0 B 334 B
⚪ isValidCaepf 782 B 782 B 0 B 479 B
⚪ isValidCbo 16.4 KB 16.4 KB 0 B 5.6 KB
⚪ isValidCei 714 B 714 B 0 B 472 B
⚪ isValidCep 163 B 163 B 0 B 163 B
⚪ isValidCertidao 758 B 758 B 0 B 462 B
⚪ isValidCest 7.6 KB 7.6 KB 0 B 2.3 KB
⚪ isValidCfop 2.8 KB 2.8 KB 0 B 1.4 KB
⚪ isValidCid10 26.2 KB 26.2 KB 0 B 6.8 KB
⚪ isValidClassTrib 1.8 KB 1.8 KB 0 B 639 B
⚪ isValidCnae 9.6 KB 9.6 KB 0 B 3.4 KB
⚪ isValidCnh 610 B 610 B 0 B 370 B
⚪ isValidCno 718 B 718 B 0 B 474 B
⚪ isValidCnpj 796 B 796 B 0 B 447 B
⚪ isValidCns 746 B 746 B 0 B 475 B
⚪ isValidCpf 500 B 500 B 0 B 334 B
⚪ isValidCreditCard 555 B 555 B 0 B 389 B
⚪ isValidCsosn 330 B 330 B 0 B 262 B
⚪ isValidCst 995 B 995 B 0 B 569 B
⚪ isValidCstIbsCbs 894 B 894 B 0 B 505 B
⚪ isValidEmail 171 B 171 B 0 B 157 B
⚪ isValidGtin 432 B 432 B 0 B 316 B
⚪ isValidIE 5.1 KB 5.1 KB 0 B 1.8 KB
⚪ isValidIban 531 B 531 B 0 B 376 B
⚪ isValidIe 5.1 KB 5.1 KB 0 B 1.8 KB
⚪ isValidIsbn 413 B 413 B 0 B 325 B
⚪ isValidLandlinePhone 717 B 717 B 0 B 463 B
⚪ isValidLegalNature 649 B 649 B 0 B 427 B
⚪ isValidLicensePlate 267 B 267 B 0 B 216 B
⚪ isValidMobilePhone 758 B 758 B 0 B 496 B
⚪ isValidNbs 8.5 KB 8.5 KB 0 B 2.3 KB
⚪ isValidNcm 82.6 KB 82.6 KB 0 B 22.8 KB
⚪ isValidNfeKey 1.6 KB 1.6 KB 0 B 954 B
⚪ isValidNfseKey 2.1 KB 2.1 KB 0 B 1.1 KB
⚪ isValidPIS 418 B 418 B 0 B 316 B
⚪ isValidPassport 197 B 197 B 0 B 186 B
⚪ isValidPhone 1.8 KB 1.8 KB 0 B 909 B
⚪ isValidPis 418 B 418 B 0 B 316 B
⚪ isValidPixKey 2.3 KB 2.3 KB 0 B 1.1 KB
⚪ isValidPixPayload 4.2 KB 4.2 KB 0 B 1.9 KB
⚪ isValidProcessoJuridico 699 B 699 B 0 B 429 B
⚪ isValidRegistroProfissional 1.2 KB 1.2 KB 0 B 724 B
⚪ isValidRenavam 516 B 516 B 0 B 356 B
⚪ isValidServiceItem 1.2 KB 1.2 KB 0 B 694 B
⚪ isValidServicePhone 706 B 706 B 0 B 372 B
⚪ isValidSuframa 590 B 590 B 0 B 411 B
⚪ isValidVin 848 B 848 B 0 B 573 B
⚪ isValidVoterId 706 B 706 B 0 B 427 B
⚪ parseBoleto 247 B 247 B 0 B 215 B
⚪ parseCaepf 199 B 199 B 0 B 183 B
⚪ parseCbo 198 B 198 B 0 B 182 B
⚪ parseCei 199 B 199 B 0 B 183 B
⚪ parseCep 198 B 198 B 0 B 182 B
⚪ parseCertidao 199 B 199 B 0 B 183 B
⚪ parseCest 198 B 198 B 0 B 182 B
⚪ parseCfop 198 B 198 B 0 B 182 B
⚪ parseCid10 177 B 177 B 0 B 170 B
⚪ parseCnae 198 B 198 B 0 B 182 B
⚪ parseCnh 199 B 199 B 0 B 183 B
⚪ parseCno 199 B 199 B 0 B 183 B
⚪ parseCnpj 298 B 298 B 0 B 240 B
⚪ parseCns 199 B 199 B 0 B 184 B
⚪ parseCpf 199 B 199 B 0 B 183 B
⚪ parseCurrency 610 B 610 B 0 B 409 B
⚪ parseIban 227 B 227 B 0 B 202 B
⚪ parseIsbn 150 B 150 B 0 B 150 B
⚪ parseLegalNature 198 B 198 B 0 B 182 B
⚪ parseLicensePlate 177 B 177 B 0 B 170 B
⚪ parseNcm 198 B 198 B 0 B 182 B
⚪ parseNfeKey 412 B 412 B 0 B 312 B
⚪ parseNfseKey 253 B 253 B 0 B 219 B
⚪ parsePassport 177 B 177 B 0 B 169 B
⚪ parsePhone 370 B 370 B 0 B 281 B
⚪ parsePis 199 B 199 B 0 B 183 B
⚪ parseProcessoJuridico 199 B 199 B 0 B 182 B
⚪ parseSuframa 198 B 198 B 0 B 181 B
⚪ parseVoterId 199 B 199 B 0 B 183 B
⚪ removeAccents 99 B 99 B 0 B 119 B
🟡 subBusinessDays 8.6 KB 9.6 KB +930 B (+10.5%) 3.4 KB
⚪ toStandardSchema 284 B 284 B 0 B 233 B
How this is measured

Every export is imported alone into an esbuild consumer bundle (minified, tree-shaken) built from the head and from the base of this pull request; the sizes are the resulting bundles, gzip is their gzipped size. 🔴 marks a regression: a pre-existing export that grew more than 20% and more than 256 B, or the bundle importing every pre-existing export growing more than 5%. 🟡 is growth under the threshold, 🟢 a decrease, ⚪ no change, 🆕 an export that does not exist on the base (never a regression), 🗑️ an export that was removed. An intentional increase is accepted with the tree-shaking: accepted label.

@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (claude/capitals-regions@1440ae8). Learn more about missing BASE report.

Additional details and impacted files
@@                     Coverage Diff                     @@
##             claude/capitals-regions      #603   +/-   ##
===========================================================
  Coverage                           ?   100.00%           
===========================================================
  Files                              ?       235           
  Lines                              ?      2418           
  Branches                           ?       720           
===========================================================
  Hits                               ?      2418           
  Misses                             ?         0           
  Partials                           ?         0           
Flag Coverage Δ
node 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…y questions

- AP 25/07 (Dia de São Tiago) has no entry in any year: STF ADI 4820 struck
  Lei AP nº 1.696/2012 down (20/09/2018, trânsito 12/12/2018).
- National: the other festas nacionais of Decreto nº 155-B/1890 and Decreto
  nº 3/1891 (24/02, 03/05, 13/05, 14/07, 12/10) up to 1930, and 03/05,
  16/07 and 12/10 under Lei nº 108/1935 until Decreto-lei nº 486/1938.
- The weekday general elections of 1955, 1958, 1990 and 1994, feriados
  nacionais under Lei nº 1.266/1950, art. 1º (1955 also Lei nº 2.550/1955).
- GO: 26/07, 24/10 and 28/10 from 1986 (Lei GO nº 9.990/1986, then Lei GO
  nº 10.460/1988), and 02/11 as a GO holiday from 1986 to 2002.
- AL 16/09 typed state from 2011, as the calendar decrees label it.
- PE data magna on the first Sunday of March from 2010 to 2017
  (Lei PE nº 13.835/2009), a new firstSundayOfMonth date rule.
- SC: a Saturday date moves to the Sunday too (Decreto SC nº 1.460/2018),
  and 25/11/2004 keeps its transfer (ALESC compilation of Lei 10.306/1996).
- RO 04/01 from 1983 (Decreto-Lei RO nº 39/1982).
- Docs: SC law date, GO and RO decree moves, AC decrees 2024-2026, TRT-13
  on PB 05/08, AL decree sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLkm9YrtAifc6XCLFVEsdH
@hyanmandian hyanmandian changed the title fix(holidays): read stateCode like the other state utils and reject a non-state fix(holidays): read stateCode like the other state utils, and follow the official texts on the open holiday questions Sep 28, 2026
@hyanmandian
hyanmandian merged commit 1f82b56 into main Sep 29, 2026
36 of 51 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1118f190 Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants