Skip to content

Commit 6771f06

Browse files
authored
Merge pull request #338 from RVBE/patch-1
Fix for incorrect duration of Months and Quarters
2 parents 27eb58d + 6ad8e0c commit 6771f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/task.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ export const TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile
281281
case 'hour': tmpPer = Math.round(hours); vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['hrs'] : pLang['hr']); break;
282282
case 'day': tmpPer = Math.round(hours / 24); vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['dys'] : pLang['dy']); break;
283283
case 'week': tmpPer = Math.round(hours / 24 / 7); vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['wks'] : pLang['wk']); break;
284-
case 'month': tmpPer = Math.round(hours / 24 / 7 / 30); vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['mths'] : pLang['mth']); break;
285-
case 'quarter': tmpPer = Math.round(hours / 24 / 7 / 30 / 3); vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['qtrs'] : pLang['qtr']); break;
284+
case 'month': tmpPer = Math.round(hours / 24 / 7 / 4.35); vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['mths'] : pLang['mth']); break;
285+
case 'quarter': tmpPer = Math.round(hours / 24 / 7 / 13); vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['qtrs'] : pLang['qtr']); break;
286286
}
287287
return vDuration;
288288
}

0 commit comments

Comments
 (0)