Top
image credit: Freepik

.NET 6: Date and Time Structures

April 13, 2021

Via: InfoQ

A long-standing problem with .NET’s Base Class Library is the inability to separately represent date and time values. As part of .NET 6, the new DateOnly and TimeOnly classes seek to correct this oversight.

Since the 90’s, Windows programmers have been dealing with a less than optimal story around date and time values. In Visual Basic there was just the Date class, which was used for dates, times, date+time, and duration values. This often led to problems such as values that were only meant to have a date component also picking up a time component or vise-versa.

Read More on InfoQ