Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 630 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 630 Bytes

csharp-date

Implementation of the missing C# Date struct.

Instructions

Include as a single file.

Example

Date today = Date.Today;
Date yesterday = Date.Today.AddDays(-1);
Date piDay = Date.Parse("2015-03-14");

piDay.ToLongString();    // "Saturday, March 14, 2015"
piDay.ToShortString();   // "3/14/2015"
piDay.ToString();        // "3/14/2015"
piDay.ToString("s");     // "2015-03-14"
int march = piDay.Month;  // 3

Licensed under MIT.