Top "Nsdateformatter" questions

Class that creates string representations of NSDate (and NSCalendarDate) objects, and convert textual representations of dates and times into NSDate objects.

NSDateFormatter, am I doing something wrong or is this a bug?

I'm trying to print out the date in a certain format: NSDate *today = [[NSDate alloc] init]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] …

iphone ios objective-c nsdate nsdateformatter
NSDateformatter setDateFormat according to currentLocale

I'm going mad with, probably, a stupid problem. I have 3 strings: year, month and day. I need to have a …

cocoa-touch ios nsdateformatter nslocale
NSDateFormatter in 12-hour mode

I have the following code. NSDateFormatter *df = ...; [df setTimeZone:[NSTimeZone defaultTimeZone]]; [df setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZZZ"]; NSDate * date = [df …

objective-c ios datetime nsdate nsdateformatter
NSDateFormatter returning nil in OS 4.0

I had the following code working on on OS 3.x NSString *stringDate = @"2010-06-21T20:06:36+00:00"; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; […

iphone ios4 nsdateformatter
How to Format Date in to String Like as "One Days Ago","Minutes Ago" in IOS?

I make an Application that contains JSON parse data here is my JSON parse data containing a Date like "2014-12…

ios iphone json nsdateformatter
Convert ISO 8601 to NSDate

I have a timestamp coming from server that looks like this: 2013-04-18T08:49:58.157+0000 I've tried removing the colons, I've …

objective-c formatting nsdate nsdateformatter iso
Creating an NSDateFormatter in Swift?

I am new to swift and am very unfamiliar with Objective-C. Could someone help me convert this to Swift? I …

objective-c swift date nsdate nsdateformatter
iOS 7: Convert NSDate to string with custom timezone and get back new NSDate

I wish to modify current system time (set a custom NSTimeZone) and get back a new NSDate object. The code …

ios objective-c nsdate nsdateformatter nstimezone
iOS : Switching between 12/24 hour times from strings

Interesting issue thats caught me out. I receive string times from a server to a device. which I then convert …

ios objective-c nsdate nsdateformatter
Adding Time Offset in Swift

I have a bunch of different show times in a database and want to display the correct time based on …

swift nsdateformatter timezone-offset