Skip to content

Commit

Permalink
废弃 self.generatesCalendarDates = YES;老旧 API
Browse files Browse the repository at this point in the history
  • Loading branch information
lijianghuai committed Apr 1, 2022
1 parent d377f8f commit 1e6c959
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions LKDBHelper/Helper/LKDBUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ - (instancetype)init {
self = [super init];
if (self) {
_lock = dispatch_semaphore_create(1);
self.generatesCalendarDates = YES;
self.generatesCalendarDates = NO;
self.dateStyle = NSDateFormatterNoStyle;
self.timeStyle = NSDateFormatterNoStyle;
self.AMSymbol = nil;
self.PMSymbol = nil;
NSLocale *locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
if (locale) {
[self setLocale:locale];
}
self.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
self.calendar = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
if ([LKDBUtils respondsToSelector:@selector(onCreateWithDateFormatter:)]) {
[LKDBUtils onCreateWithDateFormatter:self];
}
Expand Down

0 comments on commit 1e6c959

Please sign in to comment.