2024. 4. 17. 12:23 [js/js date]
[date->string]YYYY-MM-DD: new Date().toISOString().slice(0,10), moment를 쓴다면 moment().format("YYYY-MM-DD") (0) |
2024.04.17 |
[string->date]moment를 쓰면 moment('20240101'), moment('2024-01-02') 모두 가능, 안쓰면 new Date('20240101') 불가능 (0) |
2024.04.17 |
오늘 0시: new Date( new Date().setHours(0, 0, 0, 0) ) (0) |
2024.03.25 |
이달 마지막날: ( d=> new Date(d.getFullYear(), d.getMonth()+1, 0) ) (new Date()) 날짜자리에 0,음수사용가능 (0) |
2024.03.25 |
이달 첫날: ( d=> new Date(d.getFullYear(), d.getMonth(), 1) ) (new Date()) (0) |
2024.03.25 |