Top "Nsdateformatter" questions

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

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
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
What is the best way to deal with the NSDateFormatter locale "feechur"?

It seems that NSDateFormatter has a "feature" that bites you unexpectedly: If you do a simple "fixed" format operation such …

ios objective-c iphone locale nsdateformatter
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
NSTimeInterval to NSDate

How can I convert a NSTimeInterval to NSDate? Think of it like a stopwatch. I want the initial date to …

objective-c nsdate nsdateformatter nstimeinterval
Convert NSDate to NSString with NSDateFormatter with TimeZone without GMT Time Modifier

I'm initializing my NSDateFormatter thusly: NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"] autorelease]]; […

objective-c timezone nsdateformatter nstimezone
NSDateFormatter not showing full month name, only single digit number

Not sure what the issue is, but instead of getting a month name "July", I get "07". dateFormat = [[NSDateFormatter alloc] init]; […

ios nsdate nsdateformatter
Swift NSDateFormatter not using correct locale and format

This is my code: let currentDate = NSDate() let usDateFormat = NSDateFormatter() usDateFormat.dateFormat = NSDateFormatter.dateFormatFromTemplate("d MMMM y", options: 0, locale: NSLocale(…

ios swift nsdate nsdateformatter