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

Commit

Permalink
Fixed a dateFormatter issue (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
nixnoughtnothing authored and ArtSabintsev committed Jun 19, 2017
1 parent 0e5a957 commit 2d13e24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Harpy/Harpy.m
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ - (NSInteger)daysSinceDate:(NSDate *)date {

- (NSInteger)daysSinceDateString:(NSString *)dateString {
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss'Z'";
NSDate *releaseDate = [dateFormatter dateFromString:dateString];
return [self daysSinceDate:releaseDate];
Expand Down

0 comments on commit 2d13e24

Please sign in to comment.