Date and Time
iPhone Developer Tips Stats:
|
Date Formatter Examples – Take 4: Setting Locale
A reader recently wrote and asked how to show a date output in a different language. By default, the NSDateFormatter will use the locale set on the device, so no code specific locale changes are required if you want your app to display in the current locale.
However, if you need to display a date [...]
Determining Elapsed Time
I recently wrote a short block of code to display an activity indicator while waiting for an image to be written to the iPhone camera roll. The problem I ran into is that the time to write the image file varies, depending on the image size. In some cases the activity indicator would be visible [...]
Date Formatter Examples – Take 3: Date from String
While working on an iPhone application recently, I needed to convert a date read from an XML stream that was in the following format: 20081122 to a nicely formatted string for display on the device: Saturday November 22, 2008.
Date Formatter Examples – Take 2: Format Strings
In the first post on working with dates several of the examples use the “old style” date format syntax. The examples work, however, I want to show an additional example that uses the ICU (International Components for Unicode) library for format strings.
Date Formatter Examples – Take 1: NSDateFormatter
Sometimes all you’re really looking for is a basic chunk of code to get something done. For example, I was working on an application yesterday and needed to display the current date in text format: October 29, 2008. A simple concept for sure, however, with the many nuances of date formatters, it takes some time [...]








