Quantcast
Channel: How do I get the difference between two Dates in JavaScript? - Stack Overflow
Viewing all articles
Browse latest Browse all 20

Answer by hiren gamit for How do I get the difference between two Dates in JavaScript?

$
0
0
function checkdate() {    var indate = new Date()    indate.setDate(dat)    indate.setMonth(mon - 1)    indate.setFullYear(year)    var one_day = 1000 * 60 * 60 * 24    var diff = Math.ceil((indate.getTime() - now.getTime()) / (one_day))    var str = diff +" days are remaining.."    document.getElementById('print').innerHTML = str.fontcolor('blue')}

Viewing all articles
Browse latest Browse all 20

Trending Articles


FLASHBACK WITH SIRASA FM AT GALGAMUWA 2022


Mp3 Download: Mdu - Mazola


Imitation gun was fired at motorist in Leicester road-rage incident


Ndebele names


MCKINNEY EMALINE “EMMA” OF WES...


Okra & Motia — The Workshop (Prod by Hammer)


Skint TV teen to be sentenced


Moondru Mudichu 19-09-2017 – Polimer tv Serial


YOSVANI JAMES Arrested by Miami-Dade County Corrections on Jan 10, 2017


Stories • Goddess Stepmom



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>