Fix date range identification bug. #886
Fix date range identification bug. #886

Also move NSDateFormatter to a class method and setup using dispatch_once.

(cherry picked from commit 83c1741493e94fd366dae935f7766c968af2f36d)

smartcop/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS