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

Fix ISO8601Formatter parsing dates that end in Z #44

Merged
merged 1 commit into from
Oct 4, 2015

Conversation

jakecraige
Copy link
Contributor

Why:

Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z").
http://www.w3.org/TR/NOTE-datetime

  • ISO8601Formatter would fail to parse dates(unless it hit the default case) ending in Z

This change addresses the need by:

  • Adding Enum cases to support character counts for dates with Z
  • Remove default case of the switch by making it exhaustive
  • Add tests for these cases

Why:

> Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z").
> http://www.w3.org/TR/NOTE-datetime

* `ISO8601Formatter` would fail to parse dates(unless it hit the default case) ending in Z

This change addresses the need by:

* Adding Enum cases to support character counts for dates with Z
* Remove default case of the switch by making it exhaustive
* Add tests for these cases
malcommac added a commit that referenced this pull request Oct 4, 2015
Fix ISO8601Formatter parsing dates that end in Z
@malcommac malcommac merged commit a0becf8 into malcommac:master Oct 4, 2015
@malcommac
Copy link
Owner

Thank you ^^

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