Skip to content

Commit 73b8d2f

Browse files
committed
Change locale
Fix locale passed to the dateFormat(fromTemplate:options:locale:) method to be in line with the documentation
1 parent db443a1 commit 73b8d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSDateFormatter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ open class DateFormatter : Formatter {
8080
}
8181

8282
open func setLocalizedDateFormatFromTemplate(_ dateFormatTemplate: String) {
83-
if let format = DateFormatter.dateFormat(fromTemplate: dateFormatTemplate, options: 0, locale: .current) {
83+
if let format = DateFormatter.dateFormat(fromTemplate: dateFormatTemplate, options: 0, locale: locale) {
8484
dateFormat = format
8585
}
8686
}

0 commit comments

Comments
 (0)