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

Develop #1647

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Develop #1647

wants to merge 3 commits into from

Conversation

Barosz30
Copy link

@Barosz30 Barosz30 commented Nov 3, 2023

So here we are. Any suggestions?

Copy link

@zaura333 zaura333 left a 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

Copy link

@JoyCoffeeAddict JoyCoffeeAddict left a comment

Choose a reason for hiding this comment

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

Almost perfect!


// couldnt put getter in object, so i put it here;
// Oh well
if (!dataHolder.YY) {

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.

Suggested change
if (!dataHolder.YY) {
if (dataHolder.YY === undefined) {

dataHolder.YY = year.slice(-2);
}

if (!dataHolder.YYYY) {

Choose a reason for hiding this comment

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

As mentioned above.

Copy link

@mbruhler mbruhler left a comment

Choose a reason for hiding this comment

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

approved, well done

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