feat(chat): 날짜 구분선 현지화 포매터를 추가한다

This commit is contained in:
Yu Sung
2026-10-16 19:54:25 +09:00
parent 3bd75f188f
commit e765c3c75c
4 changed files with 130 additions and 0 deletions
@@ -0,0 +1,16 @@
import Foundation
enum UserCreatorChatDatePresentation {
static func title(for date: Date, locale: Locale, calendar: Calendar, timeZone: TimeZone) -> String {
var calendar = calendar
calendar.timeZone = timeZone
let formatter = DateFormatter()
formatter.locale = locale
formatter.timeZone = timeZone
formatter.calendar = calendar
formatter.doesRelativeDateFormatting = false
formatter.setLocalizedDateFormatFromTemplate("yMMMMdEEEE")
return formatter.string(from: date)
}
}