How to get unix timestamp from tomorrow nodejs
var d = new Date(); d.setDate(d.getDay() - 1); d.setHours(0, 0, 0); d.setMilliseconds(0); console.log(d/1000|0)
Here is what the above code is Doing:
1. Create a new Date object
2. Set the date to yesterday
3. Set the time to midnight
4. Set the milliseconds to 0
5. Divide the date by 1000 and bitwise OR it with 0 to get the integer value