I'm running into an issue when it comes to taking two NSDate
s and displaying a localized string for the range.
For example, say my dates are on July 7 and July 9. I would need the following localized strings:
- EN: July 7-9
- FR: 7-9 Juliet
- ES: 7-9 Julio
- DE: 7. bis. 9. Juli
Obviously using NSString stringWithFormat:
isn't going to work here. For the sake of simplicity, let's not even get into the case where your range is two separate months. I know how to get a formatted string for each date but it's formatting it in a range that is getting me.
Is there way of using an NSDateFormatter
to get this? The more I look around, the more I think I'm going to need to have a switch for each locale.
EDIT: To clarify, I only need the date range for the user's locale. I don't need all of them at the same time.
[NSString stringWithFormat:@"%@ - %@", beginDate, endDate]
. – AdamPro13