Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap out moment for Luxon #7702

Merged
merged 5 commits into from
Mar 12, 2024
Merged

Swap out moment for Luxon #7702

merged 5 commits into from
Mar 12, 2024

Conversation

jrjohnson
Copy link
Member

This wraps up all the components in frontend where we were importing and using moment.

@jrjohnson jrjohnson force-pushed the luxon-myprofile branch 2 times, most recently from 95b615e to dce1ab8 Compare March 9, 2024 07:09
@jrjohnson jrjohnson marked this pull request as ready for review March 9, 2024 16:18
@jrjohnson jrjohnson requested a review from stopfstedt March 9, 2024 16:18
@jrjohnson jrjohnson requested a review from stopfstedt March 12, 2024 06:06
Luxon returns an object from diffing that can be formatted and sending a
double format 'mm' instead of 'm' will automatically pad the result so
we can drop the pad work as well.
I also dropped the constructor because we can set date inline and it
gets traspiled to the same thing.
We don't need to type force into an integer anymore because that is what
DateTime returns for these values.
This internationalizes the output as well. It changes the format
slightly (for en it's m/d/y) but I don't see any reason to make this
more complicated.
Luxon starts the week on Monday and Ends it on Sunday, however we've
been relying on Moment to start it on Sunday so these dates need a small
adjustment.
@dartajax dartajax merged commit 15bec56 into ilios:master Mar 12, 2024
26 checks passed
@jrjohnson jrjohnson deleted the luxon-myprofile branch March 12, 2024 18:22
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