Skip to content

Instantly share code, notes, and snippets.

@ianfnelson
Created September 18, 2014 13:17
Show Gist options
  • Save ianfnelson/5b76db392a007f255f1e to your computer and use it in GitHub Desktop.
Save ianfnelson/5b76db392a007f255f1e to your computer and use it in GitHub Desktop.
Snippet from 2009 blog post ".NET - Retrieving the Month Name"
/// <summary>
/// Converts a month number into the name
/// </summary>
/// <param name="monthNumber"></param>
private string GetMonthName(int monthNumber)
{
return String.Format("{0:MMMM}", new DateTime(1969, monthNumber, 1));
}
System.Globalization.DateTimeFormatInfo.CurrentInfo.GetMonthName(monthNumber)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment