diff options
author | Sam Potts <sam@potts.es> | 2019-01-08 23:34:59 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2019-01-08 23:34:59 +1100 |
commit | 4d3e188401f33f7a9d978bf4db03ca502b606602 (patch) | |
tree | 0d3b441e13c3818989f3b32f0a3d6288a0be152a /src/js/utils/time.js | |
parent | cd9cbfbd1ecc50ebe463e1a9876c86478bc12b8f (diff) | |
parent | 6be125db8762c7ee8d29282ff5bcd08e6bcee042 (diff) | |
download | plyr-4d3e188401f33f7a9d978bf4db03ca502b606602.tar.lz plyr-4d3e188401f33f7a9d978bf4db03ca502b606602.tar.xz plyr-4d3e188401f33f7a9d978bf4db03ca502b606602.zip |
Merge branch 'develop' of https://github.com/sampotts/plyr into develop
Diffstat (limited to 'src/js/utils/time.js')
-rw-r--r-- | src/js/utils/time.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/utils/time.js b/src/js/utils/time.js index 7c9860fd..2deccf65 100644 --- a/src/js/utils/time.js +++ b/src/js/utils/time.js @@ -5,9 +5,9 @@ import is from './is'; // Time helpers -export const getHours = value => parseInt((value / 60 / 60) % 60, 10); -export const getMinutes = value => parseInt((value / 60) % 60, 10); -export const getSeconds = value => parseInt(value % 60, 10); +export const getHours = value => Math.trunc((value / 60 / 60) % 60, 10); +export const getMinutes = value => Math.trunc((value / 60) % 60, 10); +export const getSeconds = value => Math.trunc(value % 60, 10); // Format time to UI friendly string export function formatTime(time = 0, displayHours = false, inverted = false) { |