[SHOPTIME-3563] Q-Event/System Alarm 연동 (test)

변경 파일:
1. mainActions.js
2. helperMethods.js

변경 내용:
1. setMainLiveUpcomingAlarm 함수, onSuccess, startTime 수정
2. parseDateTime 함수 추가
This commit is contained in:
younghoon100.park
2024-09-10 16:08:30 +09:00
parent 4702bddd94
commit 93129b1e41
2 changed files with 25 additions and 9 deletions

View File

@@ -482,3 +482,21 @@ export const parseLocalizedNumber = (numberString, countryCode) => {
return parseFloat(numberString);
};
export const parseDateTime = (dateTimeStr) => {
const dateTimePattern = /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/;
const matches = dateTimeStr.match(dateTimePattern);
if (matches) {
const [_, year, month, day, hour, minute, second] = matches.map(Number);
return {
year: year,
month: month,
day: day,
hour: hour,
minute: minute,
second: second,
};
}
};