You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.
This library is great! One question: can NSDate -ISO8601String ever be nil?
It's marked __nullable, but I'm not sure I understand why. It calls -ISO8601StringWithTimeZone (also __nullable), which in turn calls +stringForDateComponents, which is __nullable. That method returns nil if !hasDate && !hasTime, which makes sense.
I understand why the string formatter for NSDateComponents has to check this, and therefore be nullable. But if it's being called on a converted NSDate, that's always going to have them, right?
I guess what I'm suggesting is either:
NSDate -ISO8601String (and its WithTimeZone variant) shouldn't be __nullable, or:
it should document in what case these can return nil (because unlike the parsers, or the NSDateComponents variants, it's not at all obvious)
Thanks!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This library is great! One question: can NSDate
-ISO8601String
ever be nil?It's marked
__nullable
, but I'm not sure I understand why. It calls-ISO8601StringWithTimeZone
(also__nullable
), which in turn calls+stringForDateComponents
, which is__nullable
. That method returns nil if!hasDate && !hasTime
, which makes sense.I understand why the string formatter for NSDateComponents has to check this, and therefore be nullable. But if it's being called on a converted NSDate, that's always going to have them, right?
I guess what I'm suggesting is either:
-ISO8601String
(and its WithTimeZone variant) shouldn't be__nullable
, or:Thanks!
The text was updated successfully, but these errors were encountered: