Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getSecondsToday () {
- var now = new Date();
- var today = new Date(now.getFullYear(), now.getMonth(), now.getDay());
- var diff = now - today;
- var diff_sec = diff / 1000;
- return diff_sec;
- }
- alert(getSecondsToday());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement