Repository navigation
Workdays Calculator: exclusive-date mode and accurate guidance in 17 languages - #93
Merged
appdevelopsk merged 39 commits intoNov 14, 2026
Merged
Conversation
This was referenced Nov 14, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters for real users
Public Toolify365
/en/tools/workdays-calculatorcurrently says to always subtract 2 to calculate days strictly between two dates; that fails when either boundary is a weekend/holiday, and fails for same-day ranges. The same incorrect advice exists in all 17 localized FAQ files. The English FAQ also wrongly sends people to a separate Date Calculator to add N workdays, despite this tool already havingN workdays from a datemode with its own custom holiday list. These are concrete usability/trust bugs in a high-intent business-day tool, not speculative SEO gains.Actual implementation
site/src/tools/workdays-calculator/workday-range.ts, preserving inclusive behavior by default and adding optionalexcludeEndpointsthat skips the actual boundary dates without falsely subtracting two business days. Weekend, custom holidays and preset holidays follow existing behavior; reversed/invalid ranges return safe zeros.Exclude start and end datescheckbox in Date range mode only, persist in existing shareable-state flow, label anonymous GA4 interaction as+exclusivewithout sending dates or user-input values, show zero correctly for same-day exclusive ranges, filter excluded holidays from the displayed in-range holiday list.workday-range.test.ts(inclusive, both weekdays, one weekend endpoint, same day, adjacent dates, holiday, Saturday workweek, reverse/invalid range, timezone-safe local date).site/scripts/workdays-faq-parity.test.mjsvalidating every language's label/FAQ and component binding; enforce insite/package.jsonprebuild and expose npmtest:workdays-faq.Tests and limits
tsc --strict --target ES2022 --module commonjs) and ran 9/9 Node test cases successfully using Node 22. This is NOT a fullnpm test/Next.js build from the original checkout.npm test,npm run typecheck,npm run build, mobile browser preview, live production release or real-visitor measurement was performed. The existing Toolify draft PR Toolify post-merge: safe embeds, share UX and manual-only Actions for all workflows (DRAFT) #41 remains separate; its 21 changed files do not overlap this focused workdays + locale change.Deployment checks
Before publishing, run from
site/:npm run test:workdays-faq && npm test -- workday-range.test.ts && npm run typecheck && npm run build, inspect EN/JA/AR mobile layout, share-state restore, exact holiday calculations and signed N-workdays mode. After authorized deployment check visible public HTML and use real-user interactions with GA4 session data/log filtering (not raw bot-inflated sessions). No active-user uplift is claimed by this PR.