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.
Description
.NET 6 introduced two new interesting time structures,
DateOnlyandTimeOnly, see this PR.Currently one can workaround the missing APIs in Fluent Assertions by converting
DateOnlytoDateTimeandTimeOnlytoTimeSpan.It would be nice if we had native APIs for asserting on
DateOnlyandTimeOnly.I believe most assertions can simply be copied from the
[Nullable]DateTimeAssertionsand[Nullable]SimpleTimeSpanAssertions.