DBNSDateSerializer
Objective-C
@interface DBNSDateSerializer : NSObject
Swift
class DBNSDateSerializer : NSObject
Serializer functions used by the SDK to serialize/deserialize NSDate
types.
-
Returns a json-compatible
NSString
that represents anNSDate
type based on the suppliedNSDate
object and date format string.Declaration
Objective-C
+ (nonnull NSString *)serialize:(nonnull NSDate *)value dateFormat:(nonnull NSString *)dateFormat;
Swift
class func serialize(_ value: Date, dateFormat: String) -> String
-
Returns an
NSDate
object from the suppliedNSString
-representation of anNSDate
object and the supplied date format string.Declaration
Objective-C
+ (nonnull NSDate *)deserialize:(nonnull NSString *)value dateFormat:(nonnull NSString *)dateFormat;
Swift
class func deserialize(_ value: String, dateFormat: String) -> Date