Help with automator retrieving dates and formatting

I have a service created to populate some fields.


One of the fields is the date. I have a few requirements:


1. need to get the 'next' day's date. Date + 1 day.


2. need to re-format the date into the acceptable format for the system: ddmmyy



I'm scouring resources and so far have hit dead ends. Any help would be great.



Thanks,

TW

import Foundation

extension NSDate {
    func nextDay() -> NSDate {
        let date = NSDate()
        let calendar = NSCalendar.currentCalendar()
        let components = NSDateComponents()
        components.day = 1
       
        return calendar.dateByAddingComponents(components, toDate: date, options: [])!
    }
}

let date = NSDate().nextDay()

let formatter = NSDateFormatter()
formatter.dateFormat = "ddMMyy"
let str = formatter.stringFromDate(date)
Help with automator retrieving dates and formatting
 
 
Q