From f9cff44ceaeca3e52d1286f0d45c7693f8352c6a Mon Sep 17 00:00:00 2001 From: HongSJae Date: Mon, 6 Nov 2023 14:28:57 +0900 Subject: [PATCH] =?UTF-8?q?refactoring=20::=20workTime=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTO/Trasfer/RecruitmentDetailTransfer.swift | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Projects/Domain/RecruitmentsDomain/Interface/DTO/Trasfer/RecruitmentDetailTransfer.swift b/Projects/Domain/RecruitmentsDomain/Interface/DTO/Trasfer/RecruitmentDetailTransfer.swift index f8aa4d5c..6ea0beb7 100644 --- a/Projects/Domain/RecruitmentsDomain/Interface/DTO/Trasfer/RecruitmentDetailTransfer.swift +++ b/Projects/Domain/RecruitmentsDomain/Interface/DTO/Trasfer/RecruitmentDetailTransfer.swift @@ -7,9 +7,9 @@ public extension RecruitmentDetailResponseDTO { return String(requiredGrade) + "% 이내" } var workTime: String { - startTime.toHoursMinutes() + - " ~ " + - endTime.toHoursMinutes() + [startTime, endTime].map { + $0.components(separatedBy: ":")[0...1].joined(separator: ":") + }.joined(separator: " ~ ") } return RecruitmentDetailEntity( companyID: companyID, @@ -46,9 +46,3 @@ public extension AreaResponseDTO { ) } } - -extension String { - func toHoursMinutes() -> String { - self.components(separatedBy: ":")[0...1].joined(separator: ":") - } -}