Top "Nscalendar" questions

NSCalendar is an Apple MacOS and iOS class to deal with calendrical computation.

Get current time as string swift 3.0

How to get current time as a String (not as Date) date time format. yyyy-MM-dd HH:mm:ss

swift time swift3 nscalendar
How to get Monday's date of the current week in swift

I'm trying to get Monday's date of the current week. This is treated as the first day of the week …

swift date nscalendar
Number of days in the current month using iOS?

How can I get the current number of days in the current month using NSDate or something similar in Cocoa …

ios datetime cocoa cocoa-touch nscalendar
how do I set an existing NSDate's time?

how do I set an existing NSDate's time? That is I have a date (say current date/time), but then …

objective-c nsdate nscalendar nsdatecomponents
How to find what day of the week for any given date using Cocoa

I'm trying to figure out what day (i.e. Monday, Friday...) of any given date (i.e. Jun 27th, 2009) Thank …

objective-c cocoa nsdate nscalendar nsdatecomponents
All dates between two Date objects (Swift)

I’m creating a date using NSDateComponents(). let startDate = NSDateComponents() startDate.year = 2015 startDate.month = 9 startDate.day = 1 let calendar = NSCalendar.currentCalendar() …

swift nsdate nsdateformatter nscalendar nsdatecomponents
NSDate for first day of the month

This is quite a simple concept, but as of yet I have been unable to find an elegant (and calendar …

iphone cocoa-touch nsdate nscalendar
Creating a future date in swift with NSDate()

I'm getting an error: "Missing argument for parameter 'coder' in call" for the following code: var components = NSDateComponents() components.setValue(1,…

swift nscalendar
Compare two NSDates for same date/time

Is date1 == date2 not a valid way to compare? If not, what is the correct alternative? Here's my code: - (…

iphone objective-c nsdate nscalendar nsdatecomponents
UILocalNotification Repeat Interval for Custom Alarm (sun, mon, tue, wed, thu, fri, sat)

I'm using UILocalNotification for Alarm Purpose. I have a custom option for repeat based on weekdays (sun, mon, tue, wed, …

iphone ios ipad uilocalnotification nscalendar