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

Don't crash when passing nil string to `dateFromString:` `dateFromString:timeZone:` `dateFromString:timeZone:range:` #7

Closed cruffenach closed 11 years ago

fjolnir commented 11 years ago

Bump

(that or a NSParameterAssert([string isKindOfClass:[NSString class]]))

cruffenach commented 11 years ago

What does "Bump" mean @fjolnir ?

fjolnir commented 11 years ago

In this case "I agree". It's just forum speak for keeping a post near the top.

cruffenach commented 11 years ago

OIC cool, Wanted to make sure I wasn't missing some other implementation suggestion.

boredzo commented 11 years ago

I fixed this one in the underlying method, dateComponentsFromString:timeZone:range:fractionOfSecond:, instead. dateFromString:… inherits the fix because it uses that method and doesn't otherwise use the string.