🐛Fixes query date formatting in PublicHolidays widget

This commit is contained in:
Xert 2022-01-10 21:20:21 +01:00
parent c5bbcebe06
commit 55a84053e2
No known key found for this signature in database
GPG Key ID: 1E4759DA88592D97
1 changed files with 2 additions and 2 deletions

View File

@ -47,12 +47,12 @@ export default {
},
startDate() {
const now = new Date();
return `${now.getDate()}-${now.getMonth()}-${now.getFullYear()}`;
return `${now.getDate()}-${now.getMonth() + 1}-${now.getFullYear()}`;
},
endDate() {
const now = new Date();
const then = new Date((now.setMonth(now.getMonth() + this.monthsToShow)));
return `${then.getDate()}-${then.getMonth()}-${then.getFullYear()}`;
return `${then.getDate()}-${then.getMonth() + 1}-${then.getFullYear()}`;
},
endpoint() {
return `${widgetApiEndpoints.holidays}`