fix(i18n): 예약 날짜와 시간 표시 언어를 앱 설정에 맞춘다
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
import Foundation
|
||||
|
||||
extension Date {
|
||||
func convertDateFormat(dateFormat: String = "yyyy.MM.dd") -> String {
|
||||
func convertDateFormat(dateFormat: String = "yyyy.MM.dd", locale: Locale = .autoupdatingCurrent) -> String {
|
||||
let formatter = DateFormatter()
|
||||
formatter.dateFormat = dateFormat
|
||||
formatter.locale = Locale.autoupdatingCurrent
|
||||
formatter.locale = locale
|
||||
formatter.timeZone = TimeZone.current
|
||||
return formatter.string(from: self)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user