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

Implement DateOnly and TimeOnly converters. #839

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

stijnherreman
Copy link
Contributor

Since .NET 6 there are two new types available for dates and times: DateOnly and TimeOnly. These new converters supplement the existing DateTimeConverter.

The unit tests are based on DateTimeConverterTests. Some tests were removed because they used DateTimeKind and were identical to other tests after removing all irrelevant code. Some test cases using date/time formats were removed because they made no sense in that context, or because the formats are explicitly unsupported (i.e. throwing an exception) for DateOnly or TimeOnly.
The commented-out test cases fail, just like they do in DateTimeConverterTests. I'm not entirely sure why the various date/time format test cases exist, since they do not test additional code paths. But I've left them in for consistency.

@EdwardCooke EdwardCooke merged commit f45d1f7 into aaubry:master Oct 10, 2023
@EdwardCooke
Copy link
Collaborator

Just waiting for the build to complete and I'll get a release out

@aaubry
Copy link
Owner

aaubry commented Oct 10, 2023

This feature has been released in version 13.7.0.

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.

3 participants