NSDate Category Makes Using It Bearable
If you’ve used NSDate, you know that there are certain methods that you would love for it to have. If you’re not completely familiar with Objective-C you can add methods to any class through the use of categories. I found some extremely useful code for doing this.
The source for this code can be found on GIT here: http://github.com/billymeltdown/nsdate-helper/tree/master
There are many convenience methods included in this code for NSDate included that add useful functionality.
My favorite method in this category is the dbFormatString method which returns the date as a string formatted perfectly for your SQLite databases.
Be sure to check out this useful NSDate category class, it is a definite time saver.
Would you like to learn iPhone and iPad programming online from professional instructors who have worked for companies such as EA and Disney Mobile?
Click here for to find out about an interactive online iOS development course that is currently being offered at a discount.