fix(i18n): 예약 날짜와 시간 표시 언어를 앱 설정에 맞춘다

This commit is contained in:
Yu Sung
2026-04-01 18:44:05 +09:00
parent 39700d3b39
commit 243da1eb7d
6 changed files with 55 additions and 10 deletions

View File

@@ -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)
}