Author: Scott Hanselman - ASP.NET | Posted on: 3/5/2012 7:15:12 PM | Views : 933

Ints are easy. Strings are mostly easy. Dates? A nightmare. They always will be. There's different calendars, different formats. Did you know it's 2004 in the Ethiopian Calendar? Yakatit 26, 2004, in fact. I spoke to a German friend once about how much 9/11 affected me and he said, "yes, November 9th was an amazing day in Germany, also." Dates are hard. If I take a simple model: public class Post { public int ID { get; set; } [StringLength(60)][Required] public string Title { get; set; } [StringLength(500)] [DataType(DataType.MultilineText)] [AllowHtml] public string Text { get; set; } public DateTime PublishedAt { get; set; } } And I make a quick ASP.NET Web API controller from VS11 Beta (snipped some stuff for simplicity...(read more) ...

Go to the complete details ...