Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
Force minute rounding to 1 for menubar display
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcroox committed Sep 17, 2018
1 parent 30cb63e commit 73eae44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jira-timer",
"version": "1.0.13",
"version": "1.0.14",
"description": "Jira Timer",
"productName": "Jira Timer",
"main": "index.js",
Expand Down
5 changes: 2 additions & 3 deletions src/lib/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ export const formatSecondsToStopWatch = (seconds, displayFormat = 'hh:mm:ss') =>
return timeFormat.fromS(seconds, displayFormat)
}

// Eventualy make this part of settings
export const roundToNearestMinutes = (seconds) => {
export const roundToNearestMinutes = (seconds, forceMinuteRounding = false) => {
let state = store.getState()

let roundNearestMinute = state.settings.roundNearestMinute
let roundNearestMinute = (!forceMinuteRounding) ? state.settings.roundNearestMinute : forceMinuteRounding

let minutes = Math.ceil(seconds / 60)

Expand Down

0 comments on commit 73eae44

Please sign in to comment.