{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/700","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/700/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/700/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/700/events","html_url":"https://github.com/dotnet/corefx/issues/700","id":57070113,"number":700,"title":"Proposal: System.Date type","user":{"login":"paulirwin","id":1874103,"avatar_url":"https://avatars.githubusercontent.com/u/1874103?v=3","gravatar_id":"","url":"https://api.github.com/users/paulirwin","html_url":"https://github.com/paulirwin","followers_url":"https://api.github.com/users/paulirwin/followers","following_url":"https://api.github.com/users/paulirwin/following{/other_user}","gists_url":"https://api.github.com/users/paulirwin/gists{/gist_id}","starred_url":"https://api.github.com/users/paulirwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulirwin/subscriptions","organizations_url":"https://api.github.com/users/paulirwin/orgs","repos_url":"https://api.github.com/users/paulirwin/repos","events_url":"https://api.github.com/users/paulirwin/events{/privacy}","received_events_url":"https://api.github.com/users/paulirwin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/api%20addition","name":"api addition","color":"207de5"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Runtime","name":"System.Runtime","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"tarekgh","id":10833894,"avatar_url":"https://avatars.githubusercontent.com/u/10833894?v=3","gravatar_id":"","url":"https://api.github.com/users/tarekgh","html_url":"https://github.com/tarekgh","followers_url":"https://api.github.com/users/tarekgh/followers","following_url":"https://api.github.com/users/tarekgh/following{/other_user}","gists_url":"https://api.github.com/users/tarekgh/gists{/gist_id}","starred_url":"https://api.github.com/users/tarekgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarekgh/subscriptions","organizations_url":"https://api.github.com/users/tarekgh/orgs","repos_url":"https://api.github.com/users/tarekgh/repos","events_url":"https://api.github.com/users/tarekgh/events{/privacy}","received_events_url":"https://api.github.com/users/tarekgh/received_events","type":"User","site_admin":false},"milestone":null,"comments":70,"created_at":"2015-02-09T18:30:15Z","updated_at":"2015-03-13T19:03:28Z","closed_at":null,"body":"Currently, trying to use System.DateTime to represent just calendar dates is overkill and is an easy way to introduce bugs. SQL Server supports a native date-only type, and having a date-only type in .NET to match would be very handy. But not only from SQL: accepting an MVC action method parameter from an HTML5 input type=\"date\" field would be simplified with a native Date type.\r\n\r\nExamples:\r\n```C#\r\nDate d = new Date(2015, 2, 9);\r\nDate d2 = Date.UtcToday;\r\nDate d3 = Date.LocalToday;\r\n\r\n// helper methods for adding/subtracting days, months, years, or TimeSpan\r\nDate d4 = d.AddDays(7);\r\nDate d5 = d.Subtract(TimeSpan.FromYears(2));\r\n\r\nstring s = d.ToString();\r\n//--> \"2015-02-09\"\r\n\r\n// properties:\r\nint y = d.Year;\r\nint m = d.Month;\r\nint day = d.Day;\r\nDayOfWeek weekday = d.DayOfWeek;\r\nint doy = d.DayOfYear;\r\n\r\n// convert from DateTime:\r\nDate d6 = DateTime.UtcNow.ToDate();\r\nDate d7 = (Date)DateTime.UtcNow;\r\n\r\n// convert to DateTime:\r\nDateTime dt = d.ToDateTime();\r\nDateTime dt2 = (DateTime)d; // equivalent to new DateTime(d.Year, d.Month, d.Day)\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/79257906","html_url":"https://github.com/dotnet/corefx/issues/700#issuecomment-79257906","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/700","id":79257906,"user":{"login":"paulirwin","id":1874103,"avatar_url":"https://avatars.githubusercontent.com/u/1874103?v=3","gravatar_id":"","url":"https://api.github.com/users/paulirwin","html_url":"https://github.com/paulirwin","followers_url":"https://api.github.com/users/paulirwin/followers","following_url":"https://api.github.com/users/paulirwin/following{/other_user}","gists_url":"https://api.github.com/users/paulirwin/gists{/gist_id}","starred_url":"https://api.github.com/users/paulirwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulirwin/subscriptions","organizations_url":"https://api.github.com/users/paulirwin/orgs","repos_url":"https://api.github.com/users/paulirwin/repos","events_url":"https://api.github.com/users/paulirwin/events{/privacy}","received_events_url":"https://api.github.com/users/paulirwin/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T19:03:27Z","updated_at":"2015-03-13T19:03:27Z","body":"Fair enough, then we can close the issue if that's the consensus here. But please either follow @mj1856's library closely going forward or let me know what the rough criteria would be for the library being considered proven."}}