We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please check this situation since this returns invalid dates. Expiration dates in credit card is in gregorian calendar.
To replicate just change the calendar in the settings to Japanese for example.
The text was updated successfully, but these errors were encountered:
Here is the change I made to the code in order to get it right
+ (NSInteger)currentYear { static NSCalendar *__calendarToUse = nil; if (__calendarToUse == nil) { __calendarToUse = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian]; } NSDateComponents *currentDateComponents = [__calendarToUse components:NSYearCalendarUnit fromDate:[NSDate date]]; return currentDateComponents.year; }
Sorry, something went wrong.
No branches or pull requests
Please check this situation since this returns invalid dates.
Expiration dates in credit card is in gregorian calendar.
To replicate just change the calendar in the settings to Japanese for example.
The text was updated successfully, but these errors were encountered: