Skip to content

Route Day.js operations through injected factory#6836

Open
joshwooding wants to merge 1 commit into
mainfrom
fix-dayjs-adapter
Open

Route Day.js operations through injected factory#6836
joshwooding wants to merge 1 commit into
mainfrom
fix-dayjs-adapter

Conversation

@joshwooding

Copy link
Copy Markdown
Contributor

No description provided.

@joshwooding
joshwooding requested a review from mark-tate July 15, 2026 10:36
@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e37d5f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@salt-ds/date-adapters Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
saltdesignsystem Ready Ready Preview, Comment Jul 15, 2026 2:25pm

Request Review

Comment thread packages/date-adapters/src/dayjs-adapter/index.ts Outdated
@joshwooding
joshwooding requested a review from wemmyo July 16, 2026 07:43
Comment thread packages/date-adapters/src/dayjs-adapter/index.ts
}
if (timezone === "system") {
return defaultDayjs.tz.guess();
return this.dayjs.tz?.guess?.() ?? defaultDayjs.tz.guess();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth having a separate function to guess system timezone?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so? It's only used a few times

"@salt-ds/date-adapters": patch
---

Fixed the Day.js adapter to consistently use an injected Day.js factory for timezone resolution, UTC/timezone date creation, `today`, and `now`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this adequatelyexplain the additional props and any docs need updating ?

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.

4 participants