amtgard / ORK3

Version 3 of the Online Record Keeper
Other
23 stars 12 forks source link

Dues end date preview seems to be off #333

Open kenwalker opened 1 year ago

kenwalker commented 1 year ago

From ORK Help & Updates. When you enter in a dues date, the preview of when it will end can be off. The actual result is correct but the preview gives misleading results. image image

ash402 commented 7 months ago

Pretttty sure the problem is that months are 0-indexed in the Javascript Date object, and line 407 in the calculateDuesUntil() function in Admin_player.tpl just needs a +1 after newDate.getMonth(). Also make sure it does integer addition and not string concatenation.

If I ever actually learn JS and spin up an ORK instance I can test, I'll do it myself. Not gonna make a PR before then.