Created
November 29, 2013 18:18
-
-
Save ariok/7709855 to your computer and use it in GitHub Desktop.
Get the month name from its numeric representation
This file contains hidden or 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
// Return the month name | |
+ (NSString*)monthName:(NSInteger)month{ | |
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
formatter.locale = [NSLocale currentLocale]; | |
NSString *monthName = [[formatter monthSymbols] objectAtIndex:(month - 1)]; | |
return monthName; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment