Skip to content

Conversation

@JohnC-80
Copy link
Contributor

@JohnC-80 JohnC-80 commented Dec 18, 2025

migration issue = moment to DayJS...

moment:

moment.tz.setDefault("America/Chicago");
moment(<datestring>).format(); // respects setDefault()

dayJs:

dayjs.tz.setDefault("America/Chicago");
dayjs(<datestring>).format(); // doesn't respect setDefault() :o(
dayjs.tz(<datestring>).format(); // does respect setDefault() :o) 

This PR attempts to solve the above API differents by exporting dayjs.tz as dayjsTz so that usage w/o .tz can possibly continue...

dayjsTz:

dayjsTz.setDefault("America/Chicago");
// dayjs.tz.setDefault("America/Chicago"); also works
dayjsTz(<datestring>).format(); // respects setDefault()

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Bigtest Unit Test Results

    1 files  ±    0      1 suites  ±0   0s ⏱️ -24s
    5 tests  - 1 616      5 ✅  - 1 608  0 💤  - 8  0 ❌ ±0 
1 627 runs  +    5  1 627 ✅ +   13  0 💤  - 8  0 ❌ ±0 

Results for commit f469d68. ± Comparison against base commit 58e8eb0.

This pull request removes 1621 and adds 5 tests. Note that renamed tests count towards both.
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet contents ready for interaction following open ‑ Accordion - as part of an AccordionSet contents ready for interaction following open Child element was filled out successfully
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet keyboard navigation: first accordion ‑ Accordion - as part of an AccordionSet keyboard navigation: first accordion First accordion is in focus
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet keyboard navigation: last accordion ‑ Accordion - as part of an AccordionSet keyboard navigation: last accordion Last accordion is in focus
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet keyboard navigation: next accordion ‑ Accordion - as part of an AccordionSet keyboard navigation: next accordion second accordion is in focus
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet keyboard navigation: previous accordion ‑ Accordion - as part of an AccordionSet keyboard navigation: previous accordion first accordion is in focus
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet ‑ Accordion - as part of an AccordionSet has a button
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet ‑ Accordion - as part of an AccordionSet has no axe errors
Chrome_143_0_0_0_(Linux_x86_64).Accordion - as part of an AccordionSet ‑ Accordion - as part of an AccordionSet should call onRegisterAccordion callback
Chrome_143_0_0_0_(Linux_x86_64).Accordion - updating state of parent component opening the closed accordion changing the text value/parent state ‑ Accordion - updating state of parent component opening the closed accordion changing the text value/parent state renders second accordion as open
Chrome_143_0_0_0_(Linux_x86_64).Accordion - updating state of parent component opening the closed accordion changing the text value/parent state ‑ Accordion - updating state of parent component opening the closed accordion changing the text value/parent state renders state value in textField
…
Chrome_143_0_0_0_(Linux_x86_64).Date Utilities dayjsTz ‑ Date Utilities dayjsTz body of func
Chrome_143_0_0_0_(Linux_x86_64).Date Utilities dayjsTz ‑ Date Utilities dayjsTz converts time to specified timezone
Chrome_143_0_0_0_(Linux_x86_64).Date Utilities dayjsTz ‑ Date Utilities dayjsTz misuse setDefault
Chrome_143_0_0_0_(Linux_x86_64).Date Utilities dayjsTz ‑ Date Utilities dayjsTz setDefault and strictly dayjsTz
Chrome_143_0_0_0_(Linux_x86_64).Date Utilities dayjsTz ‑ Date Utilities dayjsTz uses setDefault

♻️ This comment has been updated with latest results.

@sonarqubecloud
Copy link

@JohnC-80
Copy link
Contributor Author

Closing this as it's only a syntactic sugar bandaid.

@JohnC-80 JohnC-80 closed this Jan 16, 2026
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.

1 participant