diff options
author | Sam Potts <sam@potts.es> | 2019-01-06 14:08:46 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-06 14:08:46 +1100 |
commit | db2997ef21aecde9af9f5e1d51b2440cd13a18fd (patch) | |
tree | 97b0d02ef9aa3381940bb8e886932a2b50146686 /src/js/utils/time.js | |
parent | 88ffd0f138b3db1e16dd689d9070dcd8fed4a845 (diff) | |
parent | 10c88f6e4936d522f249b78f0d02d4ea4e198030 (diff) | |
download | plyr-db2997ef21aecde9af9f5e1d51b2440cd13a18fd.tar.lz plyr-db2997ef21aecde9af9f5e1d51b2440cd13a18fd.tar.xz plyr-db2997ef21aecde9af9f5e1d51b2440cd13a18fd.zip |
Merge branch 'develop' into master
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) { |