Created
September 18, 2014 13:17
-
-
Save ianfnelson/5b76db392a007f255f1e to your computer and use it in GitHub Desktop.
Snippet from 2009 blog post ".NET - Retrieving the Month Name"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Globalization.DateTimeFormatInfo.CurrentInfo.GetMonthName(monthNumber) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment