-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Develop #1647
base: master
Are you sure you want to change the base?
Develop #1647
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 to me! Interesting idea with using an object
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.
Almost perfect!
src/formatDate.js
Outdated
|
||
// couldnt put getter in object, so i put it here; | ||
// Oh well | ||
if (!dataHolder.YY) { |
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.
It's good to compare your value to something, instead of casting it to boolean. This way you know what is checked here.
if (!dataHolder.YY) { | |
if (dataHolder.YY === undefined) { |
src/formatDate.js
Outdated
dataHolder.YY = year.slice(-2); | ||
} | ||
|
||
if (!dataHolder.YYYY) { |
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.
As mentioned above.
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.
approved, well done
So here we are. Any suggestions?