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
Comments