Top "Nsdateformatter" questions

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

How do you calculate the day of the year for a specific date in Objective-C?

This is something I found myself spending hours to figure out and therefore want to share with you. The question …

iphone objective-c nsdate nsdateformatter
How to display date with human language like "Today at xx:xx pm", "Yesterday at xx:xx am"?

I have a date "2014-07-02 20:57:38 +0000" and I want to format it as "Today at 8:57 pm". I want that if …

ios nsdate swift nsdateformatter
How to change string to date without converting to any timezone in Swift?

I know there are lot of questions passing around over this simple issue, but still I couldn't get a clear …

ios swift nsdateformatter nstimezone
NSDateFormatter show wrong year

im using xcode 4.5(4G182) with iOS 6. NSDateFormatter show wrong year in iOS 6, how to solve? NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] …

nsdateformatter ios6
How to convert a date string with optional fractional seconds using Codable in Swift4

I am replacing my old JSON parsing code with Swift's Codable and am running into a bit of a snag. …

swift swift4 nsdateformatter codable dateformatter
Swift iOS doesRelativeDateFormatting have different values besides "Today" and "Yesterday"?

I have a number of dates that I am trying to represent using a relative date such as "Today, Yesterday, 1 …

ios date swift nsdateformatter relative-date
How can convert date into "dd/MM/yyyy" format?

In my app I am using date picker & show date in textfield, Date picker given me a date in …

iphone objective-c nsdateformatter nsdatepicker
Why is allocating or initializing NSDateFormatter considered "expensive"?

What do people mean when they say this is expensive? I create instances of a lot of transient objects just …

ios nsdateformatter
NSDateFormatter - does not respect 12/24 hour (am/pm) system setting in some circumstances

I want to output a date (that has relative dates, e.g. Today, Yesterday etc.) and time (respecting the 12/24 hours …

iphone nsdateformatter
Parsing a RFC 822 date with NSDateFormatter

I'm using a NSDateFormatter to parse a RFC 822 date on the iPhone. However, there is no way to specify optional …

iphone parsing date nsdate nsdateformatter