Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # validasi range tanggal tanpa time
- var tglbuka = new Date('2020-12-08')
- tglbuka.setHours(0, 0, 0, 0)
- console.log(tglbuka)
- var tgltutup = new Date('2020-12-19')
- tgltutup.setHours(0, 0, 0, 0)
- console.log(tgltutup)
- var tglnow = new Date()
- tglnow.setHours(0, 0, 0, 0)
- console.log(tglnow)
- console.log(tglnow < tglbuka)
- console.log(tglnow > tgltutup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement