Top "Nsdate" questions

NSDate objects represent a single point in time.

What's the optimum way of storing an NSDate in NSUserDefaults?

There's two ways of storing an NSDate in NSUserDefaults that I've come across. Option 1 - setObject:forKey: // Set NSDate *myDate = […

cocoa datetime nsdate nsuserdefaults nstimeinterval
Difference between 'YYYY' and 'yyyy' in NSDateFormatter

What is exact difference between 'YYYY' and 'yyyy'. I read in this link, it states that A common mistake is …

ios objective-c nsdate nsdateformatter
How do I get weekday and/or name of month from a NSDate variable?

Alright. The problem we're having is that we have NSStrings filled with dates in the format of yyyyMMdd and what …

ios xcode nsdate nsdateformatter
Swift - check if a timestamp is yesterday, today, tomorrow, or X days ago

I'm trying to work out how to decide if a given timestamp occurs today, or +1 / -1 days. Essentially, I'd like …

ios swift nsdate nscalendar
Convert date in MM/dd/yyyy format in xcode?

I have a UIDatePicker and I m getting the selected date from it in yyyy-MM-dd format.Now I want to …

objective-c ios nsdate uidatepicker
How to get the hour of the day with Swift?

How would I get the hour of the day in Swift. I have tried NSCalendar and NSDateComponents, but I'm afraid …

ios swift nsdate
NSString to NSDate

I got a string that contains the current date by using this : NSString *date = [[NSDate date] description]; At a different …

cocoa nsstring nsdate nsdateformatter
How to change the current day's hours and minutes in Swift?

If I create a Date() to get the current date and time, I want to create a new date from …

swift nsdate
How to parse a date string into an NSDate object in iOS?

I am trying to parse a date string from xml into an NSDate object in an iPhone app I am …

iphone objective-c ios nsdate nsdateformatter
NSDateFormatter "Month" in 3 letters instead of full word

NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"dd-MM-YYYY HH:mm"]; [formatter setTimeZone:[NSTimeZone systemTimeZone]]; If i choose MM i get …

ios date nsdate nsdateformatter monthcalendar