Last active
December 23, 2015 19:29
-
-
Save drfill/6682526 to your computer and use it in GitHub Desktop.
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 date = "24.09.2013 15:50:00" // формат - день.месяц.год час:минута:секунда | |
| var a = new Date(); | |
| var regex = /(\d{1,2})\.(\d{1,2})\.(\d{4}) (\d{1,2}):(\d{1,2}):(\d{2})/; | |
| var date2 = regex.exec(date) | |
| var b = new Date(date2[3], parseInt(date2[2])-1, date2[1], date2[4], date2[5], date2[6]); | |
| var clksec = parseInt((b - a) / 1000); | |
| var clock = $('.your-clock').FlipClock(clksec, { | |
| clockFace: 'DailyCounter', | |
| countdown: true | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment