DateIntervalFormatter with unexpected strings for some locales

I am currently facing a problem with DateIntevalFormatter. When using the formatter with dateStyle = .long and timeStyle = .none the string output for some locales is not in the expected formatting. While the output for locales like en_US, de_de or fr_fr is as expected, locales like zh_Hans, ja and ko is not consistent with the dateStyle = .long of a DateFormatter. Using the dateTemplate/setLocalizedDateFormatFromTemplate() with template MMMMddyyyy seems to provide a consistent output.

Is that maybe a bug in DateIntervalFormatter?

Here some exemplary output of the below Playground code: It seems that the forum is not accepting some of the Chinese, Korean or Japanese characters, therefore you can only find the actual output of below code as attachment.

Locale: en_US (fixed), template: MMMMddyyyy
Interval = December 20 – 22, 2019
Format = December 20, 2019
Locale: en_US (fixed), dateStyle: long
Interval = December 20 – 22, 2019
Format = December 20, 2019
Locale: de_DE (fixed), template: MMMMddyyyy
Interval = 20.–22. Dezember 2019
Format = 20. Dezember 2019
Locale: de_DE (fixed), dateStyle: long
Interval = 20.–22. Dezember 2019
Format = 20. Dezember 2019
Locale: zh-Hans (fixed), template: MMMMddyyyy
Interval = 2019年12月20日至22日
Format = 2019年12月20日
Locale: zh-Hans (fixed), dateStyle: long
Interval = 2019/12/20 – 2019/12/22
Format = 2019年12月20日
Locale: ko (fixed), template: MMMMddyyyy
Interval = 2019년 12월 20일~22일
Format = 2019년 12월 20일
Locale: ko (fixed), dateStyle: long
Interval = 2019. 12. 20. ~ 2019. 12. 22.
Format = 2019년 12월 20일
Locale: ja (fixed), template: MMMMddyyyy
Interval = 2019年12月20日~22日
Format = 2019年12月20日
Locale: ja (fixed), dateStyle: long
Interval = 2019/12/20~2019/12/22
Format = 2019年12月20日 
import UIKit
func printDate(starteDate: Date, endDate: Date, locale: Locale) {
let interval = DateIntervalFormatter()
interval.locale = locale
interval.dateTemplate = "MMMMddyyyy"
let formatter = DateFormatter()
formatter.locale = locale
formatter.setLocalizedDateFormatFromTemplate("MMMMddyyyy")
print("Locale: \(locale), template: MMMMddyyyy")
print("Interval = \(interval.string(from: starteDate, to: endDate))")
print("Format = \(formatter.string(from: starteDate))")
print("Locale: \(locale), dateStyle: long")
interval.dateStyle = .long
interval.timeStyle = .none
formatter.dateStyle = .long
formatter.timeStyle = .none
print("Interval = \(interval.string(from: starteDate, to: endDate))")
print("Format = \(formatter.string(from: starteDate))")
}
let date1 = DateComponents(calendar: Calendar(identifier: Calendar.Identifier.gregorian), timeZone: TimeZone(abbreviation: "UTC"), year: 2019, month: 12, day: 20).date
let date2 = DateComponents(calendar: Calendar(identifier: Calendar.Identifier.gregorian), timeZone: TimeZone(abbreviation: "UTC"), year: 2019, month: 12, day: 22).date
printDate(starteDate: date1!, endDate: date2!, locale: Locale(identifier: "en_US"))
printDate(starteDate: date1!, endDate: date2!, locale: Locale(identifier: "de_de"))
printDate(starteDate: date1!, endDate: date2!, locale: Locale(identifier: "zh-Hans"))
printDate(starteDate: date1!, endDate: date2!, locale: Locale(identifier: "ko"))
printDate(starteDate: date1!, endDate: date2!, locale: Locale(identifier: "ja"))

Please submit a feedback report with this info and reply with its number.

DateIntervalFormatter with unexpected strings for some locales
 
 
Q