Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Commit

Permalink
All deployment targets support NSCalendarIdentifierGregorian, so le…
Browse files Browse the repository at this point in the history
…t's abolish use of `NSGregorianCalendar`.
  • Loading branch information
boredzo committed Nov 30, 2015
1 parent 590e7cf commit 8a4bc97
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#import "PRHNamedCharacter.h"
#include <vis.h>

#ifndef TARGET_OS_TV
#define TARGET_OS_TV 0
#endif

static const NSTimeInterval gSecondsPerHour = 3600.0;

@interface ISO8601ForCocoaCalendarDateTests ()
Expand Down Expand Up @@ -310,11 +306,7 @@ - (void) testParsingDateWithTimeOnly {
- (void) testUnparsingDatesWithoutTime {
_iso8601DateFormatter.includeTime = false;

#if TARGET_OS_TV
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
#else
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
#endif
XCTAssertNotNil(calendar, @"Couldn't create Gregorian calendar with which to set up date-unparsing tests");
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
XCTAssertNotNil(calendar, @"Couldn't create C/POSIX locale with which to set up date-unparsing tests");
Expand Down

0 comments on commit 8a4bc97

Please sign in to comment.