261008_01_ENH: 알림톡 템플릿 관련내용 구현 및 발송 구현
This commit is contained in:
@@ -16,3 +16,19 @@ export const getNearestFutureDateTime = (stepMinutes = RESERVE_MINUTE_STEP): str
|
||||
|
||||
return `${year}-${month}-${day}T${hour}:${minute}`
|
||||
}
|
||||
|
||||
const KST_DATE_TIME_FORMAT = new Intl.DateTimeFormat('sv-SE', {
|
||||
timeZone: 'Asia/Seoul',
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
hour12: false,
|
||||
})
|
||||
|
||||
// 날짜·시각 선택값(로컬 시각)을 예약 발송 sendDt 형식(KST "yyyy-MM-dd HH:mm:ss")으로 바꾼다.
|
||||
// 이메일·문자·알림톡 공통 형식이다.
|
||||
export const toReserveSendDt = (localDateTime: string): string =>
|
||||
KST_DATE_TIME_FORMAT.format(new Date(localDateTime))
|
||||
|
||||
Reference in New Issue
Block a user