From ac6ae94905bfc832bf765bec365475beca398df0 Mon Sep 17 00:00:00 2001 From: Lianne van der Boom Date: Tue, 23 Sep 2025 15:56:03 +0200 Subject: [PATCH] Fix start date and of month calculation --- src/date_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/date_utils.js b/src/date_utils.js index f9112e9f7..494800c59 100644 --- a/src/date_utils.js +++ b/src/date_utils.js @@ -137,7 +137,7 @@ export default { let yearDiff = date_a.getFullYear() - date_b.getFullYear(); let monthDiff = date_a.getMonth() - date_b.getMonth(); // calculate extra - monthDiff += (days % 30) / 30; + monthDiff += date_a.getDate() / 31; /* If monthDiff is negative, date_b is in an earlier month than date_a and thus subtracted from the year difference in months */