diff --git a/src/js/utilJS.js b/src/js/utilJS.js index d0b7af867cc7192a43058977a69f901aacc7106b..660fe7d0d66fd807e00507c1443a994ff78facc0 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -1113,18 +1113,10 @@ window.time = function(weeks) { if (weeks >= 52) { // at least one year r += `${num(Math.trunc(weeks / 52))} year${Math.trunc(weeks / 52) != 1 ? `s` : ``}`; - if ((weeks - 52) % 4 !== 0) { // more than x years, y months - if (Math.trunc(weeks - 52) % 4 > 3) { + if ((weeks - 52) % 4 !== 0) { // not exactly x years, y months r += `, `; - } else { - r += ` and `; - } - } else if (Math.trunc(weeks / 52) > 1) { // more than one year - if ((weeks / 52) % 2 !== 0) { // not exactly x years - r += ` and `; - } - } else if ((weeks - 52) % 4 === 0) { - if (weeks % 52 !== 0) { + } else { + if (weeks % 52 !== 0) { // not exactly x years r += ` and `; } }