I'm just flying here over. Today I needed a small countdown-script for two long-term countdowns (with years, months, days, hours, minutes, seconds) and found this one. Thought I could be a happy guy, until I recognized some small bugs. The calculation for "monthsToYear" was missing and the one for the "year" was not right (always one to much).
I extended the letters with:
x: "monthsToYear", ... (sure there is a better one letter)
and changed/extended the calculation to:
year: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368 / 12),
monthsToYear: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368) % 12,
I'm just flying here over. Today I needed a small countdown-script for two long-term countdowns (with years, months, days, hours, minutes, seconds) and found this one. Thought I could be a happy guy, until I recognized some small bugs. The calculation for "monthsToYear" was missing and the one for the "year" was not right (always one to much).
I extended the letters with: x: "monthsToYear", ... (sure there is a better one letter)
and changed/extended the calculation to: year: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368 / 12), monthsToYear: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368) % 12,
Just an quick idea for the next release.