Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. + (NSDateFormatter *)dateFormatter {
  2. static NSDateFormatter *dateFormatter;
  3. static dispatch_once_t onceToken;
  4.  
  5. dispatch_once(&onceToken, ^{
  6. dateFormatter = [[NSDateFormatter alloc] init];
  7. dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss'.000'ZZZ";
  8. dateFormatter.timeZone = [NSTimeZone systemTimeZone];
  9. });
  10.  
  11. return dateFormatter;
  12. }
  13.  
  14. - (void)setOccurAtWithNSString:(NSString *)string {
  15. self.occurAt = [[Event dateFormatter] dateFromString:string];
  16. }
  17.  
  18. - (NSString *)JSONObjectForOccurAt {
  19. return self.occurAt.description;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement