diff --git a/src/components/Widgets/PublicHolidays.vue b/src/components/Widgets/PublicHolidays.vue index 9f41fe19a3..805fc03384 100644 --- a/src/components/Widgets/PublicHolidays.vue +++ b/src/components/Widgets/PublicHolidays.vue @@ -84,9 +84,12 @@ export default { /* Assign data variables to the returned data */ processData(holidays) { const results = []; - const makeDate = (date) => timestampToDate( - new Date(`${date.year}-${date.month}-${date.day}`).getTime(), - ); + const makeDate = (date) => { + const formattedMonth = date.month.toString().padStart(2, '0'); // Ensure two digits + const formattedDay = date.day.toString().padStart(2, '0'); // Ensure two digits + const dateString = `${date.year}-${formattedMonth}-${formattedDay}T00:00:00`; + return timestampToDate(new Date(dateString).getTime()); + }; const formatType = (ht) => capitalize(ht.replaceAll('_', ' ')); holidays.forEach((holiday) => { results.push({