-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve date handling #118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just left a few minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin' good
src/harness.js
Outdated
} else { // shorthand is for days | ||
now += amount * 24 * 60 * 60 * 1000; | ||
} | ||
now = addDate(now, amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this addDate
function is only used once. it is also only one line. I'd recommend removing it from the utils and just having the line here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aiming for separation of concerns such that date implementation is isolated in dateUtils and if we may need to update it later on, it can be done in one place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my opinion is that Luxon should be our "date utility" for 99%+ of functionality. i hope we can get out of the business of providing bespoke date utilities or providing any custom date interfaces, etc. luxon does a better job than we can hope to achieve
this dateUtils is largely for backward compatibility for the old interface
@eljhkrr Will you npm publish? Do you have permission? |
Please share publish permissions |
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #20 and #124