let's get IT with DAVINA ๐ป
๋ ๋ ์ง ์ฌ์ด ๊ณ์ฐ ๋ณธ๋ฌธ
2023/2/2~2023/2/28 ๊น์ง ์ด ๋ช๋ฐ์ผ๊น?
export const getDateDiff = (d1, d2) => {
if (d1 !== null && d2 !== null) {
const date1 = new Date(d1);
const date2 = new Date(d2);
const DateDiff = date1.getTime() - date2.getTime();
return Math.abs(DateDiff / (1000 * 60 * 60 * 24));
}
};
//์ ์ฉ์?
{getDateDiff(checkin, checkout)}๋ฐ
'Project > ์ ๊ฐ?' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํต์ test (2) | 2023.02.21 |
---|---|
scroll prevent (0) | 2023.02.17 |
KakaoMap Api ์ ์ฉ (0) | 2023.02.09 |
button count ์กฐ์ /์ ํ (0) | 2023.02.09 |
์ฐ ๊ธฐ๋ฅ (์์๋ฆฌ์ํธ) (0) | 2023.02.08 |
Comments