Last active
December 30, 2015 03:29
-
-
Save ariok/7769631 to your computer and use it in GitHub Desktop.
Get an array with months names
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
- (NSArray*)monthsNames{ | |
if (!_monthsNames) { | |
NSDateFormatter * df = [[NSDateFormatter alloc] init]; | |
[df setLocale:[[NSLocale alloc] initWithLocaleIdentifier:[[NSLocale preferredLanguages] objectAtIndex:0]]]; | |
_monthsNames = [df monthSymbols]; | |
} | |
return _monthsNames; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment