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

Make date serializer respect ISO 8601 #940

Merged
merged 1 commit into from
Mar 15, 2022
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Mar 15, 2022

The default date serializer looks like it intends to follow ISO 8601, and its test says "#serialize returns a date in YYYY-MM-DD form".

But it doesn't always emit YYYY-MM-DD form, because it doesn't insert leading zeros for single digit months and days. This results in dates that aren't strictly conformant to ISO 8601.

This change adds the necessary padding.

The default date serializer looks like it intends to follow ISO 8601, and its test says "#serialize returns a date in YYYY-MM-DD form".

But it doesn't always emit YYYY-MM-DD form, because it doesn't insert leading zeros for single digit months and days. This results in dates that aren't strictly conformant to ISO 8601.

This change adds the necessary padding.

This is probably a breaking change.
@dgeb dgeb added the bug label Mar 15, 2022
@dgeb
Copy link
Member

dgeb commented Mar 15, 2022

Thanks @ef4. I'm going to mark this as a bugfix and ship in the next patch release.

@dgeb dgeb merged commit a3e4459 into orbitjs:main Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants