Created
February 4, 2015 16:24
-
-
Save ttepasse/f0740c8accc65cd4d622 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
let cal = NSCalendar(calendarIdentifier: NSGregorianCalendar)! | |
let now = NSDate() | |
var firstDay = NSDateComponents() | |
firstDay.day = 1 | |
cal.nextDateAfterDate(now, matchingComponents: firstDay, options: NSCalendarOptions.SearchBackwards) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment