{"action":"opened","issue":{"url":"https://api.github.com/repos/MatthewYork/DateTools/issues/135","labels_url":"https://api.github.com/repos/MatthewYork/DateTools/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/MatthewYork/DateTools/issues/135/comments","events_url":"https://api.github.com/repos/MatthewYork/DateTools/issues/135/events","html_url":"https://github.com/MatthewYork/DateTools/issues/135","id":125844087,"number":135,"title":"How to create Countdown From This?","user":{"login":"emtjoshhart","id":10798600,"avatar_url":"https://avatars.githubusercontent.com/u/10798600?v=3","gravatar_id":"","url":"https://api.github.com/users/emtjoshhart","html_url":"https://github.com/emtjoshhart","followers_url":"https://api.github.com/users/emtjoshhart/followers","following_url":"https://api.github.com/users/emtjoshhart/following{/other_user}","gists_url":"https://api.github.com/users/emtjoshhart/gists{/gist_id}","starred_url":"https://api.github.com/users/emtjoshhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emtjoshhart/subscriptions","organizations_url":"https://api.github.com/users/emtjoshhart/orgs","repos_url":"https://api.github.com/users/emtjoshhart/repos","events_url":"https://api.github.com/users/emtjoshhart/events{/privacy}","received_events_url":"https://api.github.com/users/emtjoshhart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-10T20:28:03Z","updated_at":"2016-01-10T20:28:03Z","closed_at":null,"body":"I have implemented your excellent examples into my project...but I am struggling to implement this into my countdown timer.  Can someone please give me an example of how DateTools would change this code so that it counts down correctly?  \r\n\r\n```    NSDate *engagementAnniversary = [NSKeyedUnarchiver unarchiveObjectWithData:engagementDate];\r\n    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];\r\n    [dateFormatter setDateFormat:@\"YYYY-MM-dd\"];\r\n    NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];\r\n    NSUInteger unitFlags = NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour|NSCalendarUnitMinute|NSCalendarUnitSecond;\r\n    components = [calendar components:unitFlags fromDate:engagementAnniversary toDate:todaysDate options:0];\r\n    \r\n    NSInteger days4     = [components day];\r\n    NSInteger months   = [components month];\r\n    NSInteger years    = [components year];\r\n    NSInteger hours    = [components hour];\r\n    NSInteger minutes  = [components minute];\r\n    NSInteger seconds  = [components second];\r\n    NSString *countdownText = [NSString stringWithFormat:@\"%ldY %ldM %ldD %ldH %ldmin %ldsec\", (long)years, (long)months, (long)days4, (long)hours, (long)minutes, (long)seconds];```"}}