There is no need for a specialized Date class because the DateTime object has a 'Date Property that automatically strips off the time information for you, and, it's so easy to wrap a DateTime struct in a Class and make it do whatever you want to do.
Create a DateTime in code, then inspect the 'Date Property: notice how it sets the time components of the DateTime Struct to certain default values: you'll see that Hour, Minute, Second, Millisecond are zeroes, and the 'TimeOfDay property is (00:00:00). Inspect the 'TimeOfDay property (a read-only struct): notice how all the fields whose names start with 'Total are set to zero.
You can take in a DateTime, use the current Culture settings to map it to UTC, get the UTC Date only, null out the Hour, Minutes, Milliseconds, etc.; easy:
public class UTCDate
{
public DateTime TheDate { private set; get; }
public UTCDate(DateTime initialDate)
{
this.TheDate = initialDate.ToUniversalTime().Date;
}
public UTCDate(string dateCandidate)
{
DateTime testDate;
if(DateTime.TryParse(dateCandidate, out testDate))
{
TheDate = testDate.ToUniversalTime().Date;
}
else
{
throw new ArgumentException("Invalid string input to UTCDate");
}
}
}
UTCDate utcDate1 = new UTCDate(DateTime.Now);
UTCDate utcDate2 = new UTCDate(utcDate1.TheDate.AddHours(-16));
UTCDate utcDate3 = new UTCDate("12/08/1999 13:12");