Top "Nsdate" questions

NSDate objects represent a single point in time.

How to convert NSDate in to relative format as "Today","Yesterday","a week ago","a month ago","a year ago"?

I want to convert nsdate in to relative format like "Today","Yesterday","a week ago","a month ago","a year …

ios objective-c nsdate nsdateformatter relative-date
Sort array of custom objects by date swift

I have a custom object "Meeting" I am adding all the objects in an array. What I want to do …

arrays swift sorting parse-platform nsdate
Is there a simple way of converting an ISO8601 timestamp to a formatted NSDate?

If I use the following code: NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm"]; NSDate *myDate = [dateFormatter dateFromString:@"2010-01…

objective-c nsdate nsdateformatter iso8601
How can I get an NSDate object for today at midnight?

What is the most efficient way to obtain an NSDate object that represents midnight of the current day?

objective-c cocoa-touch nsdate
How to sort an array of dates in descending order

I have a NSDictionary that parsed to an array one of the element is date, i tried using [startimeArray sortUsingSelector:@…

ios objective-c uitableview nsdate nsdictionary
How does one subtract hours from an NSDate?

I would like to subtract 4 hours from a date. I read the date string into an NSDate object use the …

iphone objective-c nsdate
Swift ios date as milliseconds Double or UInt64?

I'm not iOS developer but started learning Swift. I try to convert some logic from Android project to iOS. I …

swift nsdate nstimeinterval
Getting the last day of a month

How can I get the last day of the current month as an NSDate?

objective-c cocoa-touch cocoa date nsdate
Convert Optional string to date

I have this Optional(2015-07-27 19:29:50 +0000) as a string? and I want to convert it to a date (NSDate) but …

ios swift nsdate nsdateformatter
Objective C - How can i get the weekday from NSDate?

I need to be able to get the weekday from nsdate, i have the following code and it always return 1. …

objective-c nsdate weekday