     // now
     var date = NSDate()
     let oneDayinSeconds: Double = 24 * 60 * 60
+    // store users chosen locale for date formatting in header
+    let calendar = NSCalendar.currentCalendar()
+    let formatter = NSDateFormatter()
     
     let context = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext // CoreData
     var data = [Menu]()

            
            // back on the main Queue we update the header and load the Cells
            NSOperationQueue.mainQueue().addOperationWithBlock {
                // update header
                self.navItem.title = "\(NSCalendar.currentCalendar().component(.Day, fromDate: self.date)).\(NSCalendar.currentCalendar().component(.Month, fromDate: self.date)).\(NSCalendar.currentCalendar().component(.Year, fromDate: self.date))"
                // reload tableView
                self.tableView.reloadData()
            }

        self.refreshControl.tintColor = UIColor(red: 0.016, green: 0.710, blue: 0.788, alpha: 1.00)
        self.refreshControl.addTarget(self, action: "forceUpdateDatabase", forControlEvents: .ValueChanged)
        self.tableView.addSubview(refreshControl)
        
        //setup date format with users
        self.formatter.locale = NSLocale.currentLocale()
        self.formatter.dateFormat = NSDateFormatter.dateFormatFromTemplate("E ddMMyy", options: 0, locale: NSLocale.currentLocale())
        
        cleanDatabaseForThreshold(7)
        updateUITableView(force: false)
