Created
April 17, 2020 10:46
-
-
Save bikashthapa01/dc280e491d301c2fdc8d8ef1bb96e51c 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
| <script type="text/javascript"> | |
| setInterval("my_function('2020-04-17T18:30:00Z');",1000); | |
| function my_function(time){ | |
| var future = Date.parse(time)/1000; | |
| var now = Date.now()/1000; | |
| var totalRem = future - now; | |
| var days = Math.floor(totalRem/86400); | |
| var hours = Math.floor((totalRem%86400)/3600); | |
| var minutes = Math.floor(((totalRem%86400)%3600)/60); | |
| var seconds = Math.floor(((totalRem%86400)%3600)%60) | |
| document.getElementById('time').innerHTML = days+" Days "+hours+" hours "+minutes+" Minutes and " + seconds + " seconds."; | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment