In our C# project we have the need for representing a date without a time. I know of the existence of the DateTime, however, it incorporates a time of day as well.
- I want to make explicit that certain variables and method-arguments are date-based.
- Hence I can't use the
DateTime.Date
property
What are the standard approaches to this problem?
- Why is there no
Date
class in C#? - Does anyone have a nice implementation using a struct and maybe some extensionmethods on DateTime and maybe implementing some operators such as == and <, > ?
DateTime
create?