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

Extend date decoding strategy for possible fractional seconds #35

Merged
merged 3 commits into from
Oct 5, 2022

Conversation

AngeloStavrow
Copy link
Collaborator

This PR closes #34 by checking if there's a fractional second value in the returned date string, and setting .withFractionalSeconds in the formatter if relevant in the custom date decoding strategy.

We naïvely check for a fractional second value simply by verifying if the "." character exists in the date string.

If the WriteFreely instance returns dates with fractional seconds (e.g., 2022-09-28T11:55:39.886581893Z), the date-decoding strategy fails and an error is thrown.
@AngeloStavrow AngeloStavrow self-assigned this Oct 2, 2022
Copy link
Member

@thebaer thebaer 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!

@AngeloStavrow AngeloStavrow merged commit 0361ed3 into main Oct 5, 2022
@AngeloStavrow AngeloStavrow deleted the 34_bugfix-date-decoding-strategy branch October 6, 2022 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Date decoder throws error if instance uses fractional seconds
2 participants