If you have been using Cocoa for a while, you are probably familiar with NSDateFormatter
and NSNumberFormatter. They are useful for creating formatted display strings from dates and numbers, or for converting date or number strings to numerical values, supporting different languages and locales.
A few weeks ago I stumbled upon NSDateComponentsFormatterwhat allows you to create formatted time intervals, such as "4 hours, 37 minutes and 17 seconds." Pretty cool.
There is also a linked NSDateIntervalFormatterone that creates strings comparing 2 dates.
Then there are some REALLY hidden NSFormatter subclasses:
NSMassFormatter
NSByteCountFormatter
NSLengthFormatter
NSEnergyFormatter
NSPersonNameComponentsFormatter
EDIT:
From the comments I added NSPersonNameComponentsFormatter.
"NS * Formatter" Xcode , . (, , .)
,
NSDateIntervalFormatter -Difference between 2 dates
NSDateComponentsFormatter -NSDateComponents to/from string
NSDateFormatter -Formats NSDates as strings
NSNumberFormatter -Formats numbers as strings
NSMassFormatter -Formats mass quantity as strings
NSByteCountFormatter -Formats byte counts in K, MB, GB, etc.
NSLengthFormatter -Formats length values
NSEnergyFormatter -Displays energy qualities in Joules or Calories
NSPersonNameComponentsFormatter - displays localized formatted names
, , locale, /, . - , , .
- , ? , , .
EDIT # 2:
2: , , ? , . /, .