Source

ISO 8601 parser/unparser / ISO8601DateFormatter.m

Author Commit Message Labels Comments Date
Peter Hosey
Added a method to drop the cache if you get a memory warning.
Peter Hosey
Cache time zones by offset. Gets another speed-up of about 1.5×, and makes this now faster than C stdlib.
Peter Hosey
Two calendars are better than one.
Peter Hosey
Oh yeah. Let's not leak the calendar while we're at it.
Peter Hosey
Another 5× speed-up: Create and always use a single calendar per date formatter, instead of creating them and throwing them away, and make sure it always has our default time zone.
Peter Hosey
Made this almost ten times as fast by holding onto the date formatter we use for unparsing.
Peter Hosey
Change the minutes over to use precision the same as the hour does, for consistency with the hours. References #4.
Peter Hosey
Fixed #4 by amending the time string format to use a different method of zero-padding that is compatible, in Apple's implementation, with the + flag.
Peter Hosey
Fix implicit-cast warnings by using the correct formatter and explicitly casting to its type.
Peter Hosey
Initialize more variables, fixing some warnings. Thanks to Sparks for this patch.
Peter Hosey
Fixed a couple of 64-to-32 warnings that occurred when building for i386.
Peter Hosey
Fix all warnings.
Peter Hosey
Pass a date, not the ISO 8601 date formatter (oops), to the time formatter.
Peter Hosey
When not parsing strictly, allow a space before the time-zone specification, as expected by NSDate's +dateWithString: and -initWithString: methods and emitted by its -description method.
wildwobby
Variable set, but never read, and is set to something else a few lines down
Peter Hosey
Fix week dates for certain weekdays.
Peter Hosey
Massive rewrite. The parser and unparser are now together in a single NSFormatter subclass, and are now based on NSCalendar and NSDateComponents instead of NSCalendarDate.