NSLocale.autoupdatingCurrentLocale()
makes formatting i18n dates really easy.
For example:
NSDate().descriptionWithLocale(NSLocale.autoupdatingCurrentLocale()
Returns:
Monday, February 1, 2016 at 12:00:00 PM Pacific Standard Time
Is there a way I can modify this simple function to return just the date? If not, how would I build out an equivalent NSLocale object that behaves the same way, deriving the an appropriate international date string?
I would expect, for en_US
, it could return simply:
Monday, February 1, 2016