@{ var mdp = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthDayPattern; string pattern = mdp.IndexOf('M') < mdp.IndexOf('d') ? "MM.dd.yy" : "dd.MM.yy"; var eventDate = new DateTime(2015, 09, 29); }