1
0
mirror of https://github.com/Lissy93/dashy.git synced 2025-04-08 17:06:18 +02:00

🔁 Merge pull request from XertDev/FIX/public-holidays-query-format

Query date formatting in PublicHolidays widget
This commit is contained in:
Alicia Sykes 2022-01-10 23:49:11 +00:00 committed by GitHub
commit b4fb238243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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}`