projects
/
reveal.js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
396d531
)
Use Math.floor instead of parseInt to avoid problems with very small numbers like...
author
Thomas Rosenau
<rosenau@seitenbau.com>
Sun, 2 Jun 2013 09:02:53 +0000
(11:02 +0200)
committer
Thomas Rosenau
<rosenau@seitenbau.com>
Sun, 2 Jun 2013 09:02:53 +0000
(11:02 +0200)
plugin/notes/notes.html
patch
|
blob
|
history
diff --git
a/plugin/notes/notes.html
b/plugin/notes/notes.html
index 830045d1f13be712de84e120ff24a93193be194a..e75be28e89b7375f48ab97d9a52c332fb8df9827 100644
(file)
--- a/
plugin/notes/notes.html
+++ b/
plugin/notes/notes.html
@@
-212,9
+212,9
@@
now = new Date();
diff = now.getTime() - start.getTime();
- hours =
parseInt
( diff / ( 1000 * 60 * 60 ) );
- minutes =
parseInt
( ( diff / ( 1000 * 60 ) ) % 60 );
- seconds =
parseInt
( ( diff / 1000 ) % 60 );
+ hours =
Math.floor
( diff / ( 1000 * 60 * 60 ) );
+ minutes =
Math.floor
( ( diff / ( 1000 * 60 ) ) % 60 );
+ seconds =
Math.floor
( ( diff / 1000 ) % 60 );
clockEl.innerHTML = now.toLocaleTimeString();
hoursEl.innerHTML = zeroPadInteger( hours );