Daily Archives: Tuesday, 2 December, 2008

Formatting dates the hard way

I was doing a bit of a code review and I spotted this in the code base. string[] splitOptions = new string[1] { dayEarlier.Date.Year.ToString() }; string[] earlyDates = dayEarlier.Date.GetDateTimeFormats(); string[] earlySplit = earlyDates[67].Split(splitOptions, StringSplitOptions.RemoveEmptyEntries); earlySplit[0] = earlySplit[0].Replace(“,”, string.Empty); Essentially the … Continue reading

Posted in Uncategorized | Tagged , | 3 Comments