feanz
11/27/2013 - 11:30 AM

DaySuffix

DaySuffix

public static string DaySuffix(this DateTime dateTime)
		{
			return (dateTime.Day == 1)
				? "st"
				: (dateTime.Day == 2)
					? "nd"
					: (dateTime.Day == 3)
						? "rd"
						: "th";
		}