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

feat: allow formatDate and formatTime to take string type #1369

Merged
merged 2 commits into from
Jul 23, 2019
Merged

feat: allow formatDate and formatTime to take string type #1369

merged 2 commits into from
Jul 23, 2019

Conversation

leoyli
Copy link
Contributor

@leoyli leoyli commented Jul 13, 2019

JS have implicitly type conversion, 2019-07-13 can be read correctly.
This makes it easy to use when date is read from a JSON object.

Generally, I think a strict typing is important. But in this case, I think create a Date object to get things done is a bit annoying, so I would suggest to loose the typing in this case.

Leo Y. Li and others added 2 commits July 13, 2019 12:04
JS have implicitly type conversion, 2019-07-13 can be read correctly.
This makes it easy to use when date is read from a JSON object.
@longlho
Copy link
Member

longlho commented Jul 23, 2019

Thanks a lot for your contributions!

@longlho longlho merged commit d110548 into formatjs:master Jul 23, 2019
@longlho longlho added this to the v3.0.0 milestone Jul 25, 2019
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.

2 participants