-
Notifications
You must be signed in to change notification settings - Fork 731
Labels
Description
Description
.NET 6 introduced two new interesting time structures, DateOnly and TimeOnly, see this PR.
Currently one can workaround the missing APIs in Fluent Assertions by converting DateOnly to DateTime and TimeOnly to TimeSpan.
new DateOnly().ToDateTime(TimeOnly.MinValue).Should();
new TimeOnly().ToTimeSpan().Should();It would be nice if we had native APIs for asserting on DateOnly and TimeOnly.
I believe most assertions can simply be copied from the [Nullable]DateTimeAssertions and [Nullable]SimpleTimeSpanAssertions.
dennisdoomen, dimitrietataru, marcoatribeiro, julealgon and dawedawe