From 4c824ec1a11ee1866003b7e4c811149c75ae2481 Mon Sep 17 00:00:00 2001 From: Ankur Patel Date: Wed, 20 Aug 2014 21:32:04 -0400 Subject: [PATCH] Fixing Date extension --- Cent/Cent/Date.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cent/Cent/Date.swift b/Cent/Cent/Date.swift index 6ccc11a..5f25f3d 100644 --- a/Cent/Cent/Date.swift +++ b/Cent/Cent/Date.swift @@ -24,7 +24,7 @@ extension NSDate { var gregorian = NSCalendar(identifier:NSGregorianCalendar) var date = gregorian.dateFromComponents(c) - return date + return date! } /// Parses the date based on the format and return a new Date @@ -36,7 +36,7 @@ extension NSDate { var dateFmt = NSDateFormatter() dateFmt.timeZone = NSTimeZone.defaultTimeZone() dateFmt.dateFormat = format - return dateFmt.dateFromString(dateStr) + return dateFmt.dateFromString(dateStr)! } }