MagicMirror/tests/configs/modules/calendar/sliceMultiDayEvents.js
sam detweiler ea3a323581
add fix for sliceMultiDayEvents (#3543)
sliceMultiDayEvents occasionally gets the number of events wrong and
produces too many rows

Math.ceil() rounds up over 1.04 so we get an abnormal count

then the calcs for the midnight loop control used different moment()
functions, producing different results

fixes #3542
2024-09-17 08:01:49 +02:00

31 lines
557 B
JavaScript

let config = {
timeFormat: 12,
modules: [
{
module: "calendar",
position: "bottom_bar",
config: {
hideDuplicates: false,
maximumEntries: 100,
sliceMultiDayEvents: true,
calendars: [
{
maximumEntries: 100,
url: "http://localhost:8080/tests/mocks/sliceMultiDayEvents.ics"
}
]
}
}
]
};
Date.now = () => {
return new Date("01 Sept 2024 10:38:00 GMT+2:00").valueOf();
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {
module.exports = config;
}