Last active
August 29, 2015 14:05
-
-
Save abrjagad/33eaa2bcdc891f6071e9 to your computer and use it in GitHub Desktop.
Jquery Date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var d, h, m, s, | |
ms = $newDate - $currentDate; | |
s = Math.floor(ms / 1000); | |
m = Math.floor(s / 60); | |
s = s % 60; | |
h = Math.floor(m / 60); | |
m = m % 60; | |
d = Math.floor(h / 24); | |
h = h % 24; | |
console.log(d,h,m,s); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment