let's get IT with DAVINA ๐ป
GMT/UTC time ํ์ โ2023-02-02โ format์ผ๋ก change ๋ณธ๋ฌธ
DEV_IN/CSS
GMT/UTC time ํ์ โ2023-02-02โ format์ผ๋ก change
๋ค๋น์น์ฝ๋๐ 2023. 2. 8. 03:10//checkin checkout date ํ์ ๋ณํ
//Wed Apr 20 2022 00:00:00 GMT+0200 => 2022-04-20
export const DateFormat = (d1) => {
const date = new Date(d1);
const year = date.getFullYear();
const month = ("0" + (1 + date.getMonth())).slice(-2);
const day = ("0" + date.getDate()).slice(-2);
return `${year}-${month}-${day}`;
};
'DEV_IN > CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
div์ img ๋ฃ๊ธฐ (props) (0) | 2023.02.09 |
---|---|
๊ธ์ ์ ์ด๊ณผ์? (0) | 2023.02.09 |
Position (0) | 2023.02.09 |
react-datepicker (2) | 2023.02.08 |
React-Styled Components (0) | 2023.02.08 |