Remove year component from NSDateFormatter style
Posted
by JK
on Stack Overflow
See other posts from Stack Overflow
or by JK
Published on 2010-06-03T13:17:17Z
Indexed on
2010/06/03
13:44 UTC
Read the original article
Hit count: 271
I would like to present a date in the kCFDateFormatterFullStyle, but without the year. Is there any way to remove the year component from this style? My app requires localization so practically I cannot programmatically set the format string for all locales. I have come accross a solution which removes the "y" characters from the format string returned by the built in styles. Unfortunately, this is not acceptable as the year components are not represented by "y" in some other languages like Japanese. Any suggestions to get the kCFDateFormatterFullStyle without the year would be great! Thanks.
© Stack Overflow or respective owner