myOrder popup

This commit is contained in:
hyunwoo93.cha
2024-07-12 10:37:23 +09:00
parent eca8713e80
commit a24e1de0c6
6 changed files with 186 additions and 19 deletions

View File

@@ -363,3 +363,29 @@ export const getQRCodeUrl = ({
cardListUrl: `${baseUrl}card_list.jsp?cntryCd=${countryCode}`,
};
};
// ex: JANUARY 01, 2024
export const getFormattingDate = (dateString) => {
const date = new Date(dateString.replace(" ", "T"));
const monthNames = [
$L("JANUARY"),
$L("FEBRUARY"),
$L("MARCH"),
$L("APRIL"),
$L("MAY"),
$L("JUNE"),
$L("JULY"),
$L("AUGUST"),
$L("SEPTEMBER"),
$L("OCTOBER"),
$L("NOVEMBER"),
$L("DECEMBER"),
];
const month = monthNames[date.getMonth()];
const day = date.getDate().toString().padStart(2, "0");
const year = date.getFullYear();
return `${month} ${day}, ${year}`;
};