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

Birthday format needs to be consistent #8

Open
adamreisnz opened this issue Feb 14, 2019 · 6 comments · May be fixed by #9
Open

Birthday format needs to be consistent #8

adamreisnz opened this issue Feb 14, 2019 · 6 comments · May be fixed by #9

Comments

@adamreisnz
Copy link

adamreisnz commented Feb 14, 2019

The birthday field in the profile is populated straight form what comes from Facebook.
In this case it's formatted mm/dd/yyyy.

I propose we re-format this to ISO standard format, e.g. YYYY-MM-DD

Can use the following code to achieve this transformation:

if (json.birthday) {
  const parts = json.birthday.split('/');
  profile.birthday = [parts[2], parts[0], parts[1]].join('-');
}
@rwky
Copy link

rwky commented Feb 14, 2019

Agreed, YYYY-MM-DD is far less ambiguous than MM-DD-YYYY (which where I come from would be interpreted as DD-MM-YYYY).

@adamreisnz
Copy link
Author

Yes same here, great I'll go ahead and implement this, but as it could be a breaking change for some it'll likely need a major version bump. So might want to hold off until it's clear what's happening in terms of unification of the profiles?

@rwky
Copy link

rwky commented Feb 15, 2019

Agreed. I'll hopefully get time next week to have a good think on things. I also need to lint all the repos before we go making too many changes.

@adamreisnz
Copy link
Author

@rwky do you still maintain this package?

@rwky
Copy link

rwky commented Aug 11, 2020

Yep, not worked on unifying profiles lately, promise support has been a higher priority though if you want to add a PR I'll take a look :)

@mddmayln
Copy link

I suppose either way
Considering same form to understand

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 a pull request may close this issue.

3 participants