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

Fix for Issue #36 #40

Closed ChocoChipset closed 10 years ago

ChocoChipset commented 10 years ago

The previous formats (%+.2d%.2d and %+.2d%C%.2d ) assumed the first term will contain the sign of the time-zone offset.

In practice, the sign (positive or negative) can be present in both terms or in any one of them.

Hence, the sign should be extracted from the total offset in seconds and, after this, append each term's absolute value to the resulting string.

A unit case for this issue is included as well.

aggshow commented 9 years ago

Hi Peter, in my company we are using this lovely library through cocoapods but we came across the bug solved in this merge.

Is there any chance to have a new pod version to take advantage of the fix?

Cheers, Claudio.

boredzo commented 9 years ago

Hm, there kind of have been a number of fixes since 0.7. I should tag this as 0.7.1 or something.

Maybe this weekend I'll see if I can get Travis building again and, if it's green or I can get it green easily enough, I'll tag it.