I want to create a date string from two dates in format like :
"Apr 21 - Sep 17, 2018" - US
"21 Apr - 17 Sep, 2018" - Elsewhere
While respecting local date formats (MMM dd for US, dd MMM for Europe, etc).
How do I get the DateFormatter to give me the default style but without year?
let startDateFormatter = DateFormatter()
// How to keep medium style but without year?
// this is the US style,
// I want locale-independent style to match the other date formatter
startDateFormatter.dateFormat = "MMM dd"
let endDateFormatter = DateFormatter()
endDateFormatter.dateStyle = .medium
endDateFormatter.timeStyle = .none
let startDateText = startDateFormatter.string(from: startDate)
let endDateText = endDateFormatter.string(from: endDate)