diff options
author | Sam Potts <sam@potts.es> | 2019-03-16 12:14:20 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2019-03-16 12:14:20 +1100 |
commit | 35f7ee9c59ff082a5b71aae43ffccab4cdf10fdf (patch) | |
tree | 75b8f7c56ec7fa6696991e52197172c9c6c7c3cd /src/js/utils/time.js | |
parent | bdd513635fffa33f66735c80209e6ae77e0426b4 (diff) | |
parent | c202551e6d0b11656a99b41f3f8b3a48f2bf1e0a (diff) | |
download | plyr-35f7ee9c59ff082a5b71aae43ffccab4cdf10fdf.tar.lz plyr-35f7ee9c59ff082a5b71aae43ffccab4cdf10fdf.tar.xz plyr-35f7ee9c59ff082a5b71aae43ffccab4cdf10fdf.zip |
Merge branch 'develop' into css-variables
# Conflicts:
# demo/dist/demo.css
# demo/index.html
# dist/plyr.css
# gulpfile.js
# package.json
# yarn.lock
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) { |