Skip to content

Add Thanksgiving, Black Friday and Cyber Monday as no-deploy days - #1535

Open
santiagosony wants to merge 1 commit into
baires:masterfrom
santiagosony:holiday-season-dates
Open

santiagosony wants to merge 1 commit into
baires:masterfrom
santiagosony:holiday-season-dates

Conversation

@santiagosony

Copy link
Copy Markdown

Summary

Black Friday was only blocked because it falls on a Friday, so it showed the generic Friday messages. Thanksgiving and Cyber Monday were treated as regular days, so deploys were allowed in the morning.

This PR makes all three no-deploy days, each with its own messages:

Date 2026 Before After
Thanksgiving (4th Thursday of November) Thu Nov 26 Yes before 16:00 No, all day
Black Friday (the day after) Fri Nov 27 No, generic Friday reasons No, black_friday reasons
Cyber Monday (the Monday after) Mon Nov 30 Yes before 16:00 No, all day

Changes

  • helpers/time.ts: add isThanksgiving(), isBlackFriday() and isCyberMonday(), and include them in isHolidays(). Cyber Monday can fall in December (e.g. Dec 2, 2024), which is handled.
  • helpers/constants.ts (dayHelper) and component/widget.tsx (getReasonKey): pick the new reason keys.
  • locales/*.json: add thanksgiving, black_friday and cyber_monday reasons to all 9 locales. All locales need them because the client-side t() has no English fallback and would render the raw key.
  • docs/adding-languages.md: add the new keys to the template.

Tests

  • New tests/shopping-holidays.test.ts: dates from 2023 to 2029, including edge cases (a November with five Thursdays, Cyber Monday in December), shouldIDeploy, dayHelper, and a check that every locale has the new keys.
  • Three new scenarios in tests/rendering.test.tsx.
  • npx jest: 201 passed (was 154). eslint and tsc --noEmit are clean.

Translations to review

The en, es, es-AR and pt messages were written with care. The cs, sl, el, bg and zh-HK messages have not been reviewed by native speakers, so a check from someone who speaks those languages would be welcome.

🤖 Generated with Claude Code

Black Friday was only blocked because it is a Friday, and showed the
generic Friday messages. Thanksgiving and Cyber Monday were treated as
regular days, so deploys were allowed in the morning.

- Time: add isThanksgiving (4th Thursday of November), isBlackFriday
  (the day after) and isCyberMonday (the Monday after, Nov 26 - Dec 2),
  and include them in isHolidays.
- dayHelper and the widget pick dedicated reasons for each date.
- Add thanksgiving, black_friday and cyber_monday reasons to every
  locale, since the client translator has no English fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VQLW2Aptjjvno4ZUZprSr
@santiagosony
santiagosony requested a review from baires as a code owner November 26, 2026 03:17
@vercel

vercel Bot commented Nov 26, 2026

Copy link
Copy Markdown

@claude is attempting to deploy a commit to the Alexis' projects Team on Vercel.

A member of the Team first needs to authorize it.

@baires

baires commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements
95.54% (+0.19% 🔼)
428/448
🟢 Branches
93.33% (+0.77% 🔼)
252/270
🟢 Functions
97.03% (+0.09% 🔼)
98/101
🟢 Lines
95.56% (+0.19% 🔼)
409/428

Test suite run success

201 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from 33588a0

This branch has not been deployed

No deployments
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.

3 participants