boredzo / iso-8601-date-formatter

A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.
http://boredzo.org/iso8601dateformatter/
Other
600 stars 140 forks source link

iOS8/10.10 vs Apple's NSCalendar/NSDate refactoring... time for fork? #44

Open dhmspector opened 9 years ago

dhmspector commented 9 years ago

So, under iOS8 (and, I presume, Yosemite, since this is about a foundation class) presents a number of deprecation warnings -- mostly things like constants who names have changed, when trying to compile the date formatter, e.g.:

ISO8601DateFormatter.m:216:86: warning: 'NSMonthCalendarUnit' is deprecated: first deprecated in iOS 8.0 - Use NSCalendarUnitMonth instead

These could be fixed by conditionalizing the code, but that will get very ugly instantaneously - is there a plan to address this in another way? Would it make sense to make a "modern" fork for people using iOS8/Yosemite and above?

boredzo commented 9 years ago

I'd be fine with something that defines NSCalendarUnitMonth, etc. if they haven't already been defined by the SDK headers. Second best would be conditionally defining ISO8601CalendarUnitMonth, etc. to one or the other.

boredzo commented 8 years ago

0.9 will move away from older, deprecated API names to newer, not-so-deprecated API names. For that release, a simple find-and-replace would be fine.