myOrder popup
This commit is contained in:
@@ -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}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user