-
-
Save khanghoang/278c641d3404974c8139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation KZPropertyMapper (MyAppBoxing) | |
+ (NSDate *)boxValueAsDateSince1970:(id)value __used | |
{ | |
if (value == nil) { | |
return nil; | |
} | |
AssertTrueOrReturnNil([value isKindOfClass:NSNumber.class]); | |
return [NSDate dateWithTimeIntervalSince1970:[value floatValue]]; | |
} | |
@end | |
//! in boxing | |
@"timeInterval" : KZBox(DateSince1970, @"myDateProperty") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment