<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[2.32.0 Calendar module limitDays and excludedEvents stopped working]]></title><description><![CDATA[<p dir="auto">For a long time I’ve used limitDays: ‘1’,  and excludedEvents: [ ‘Tutor Time’ ], to limit my calendar display to show my kids upcoming lessons for the day, synced from their school calendar.</p>
<p dir="auto">Since the last update, limitDays seems to limit the number of events that show, rather than the number of days. Setting it to ‘1’ shows the first lesson of the day, ‘2’ shows the first two lessons etc.</p>
<p dir="auto">excludedEvents also seems to have no effect any more … the first event of every day is ‘Tutor Time’ so I exclude that, but it has started appearing since the latest update.</p>
<p dir="auto">I can’t see anything in the release notes that’d explain that ?</p>
]]></description><link>https://forum.magicmirror.builders/topic/19767/2.32.0-calendar-module-limitdays-and-excludedevents-stopped-working</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 17:28:36 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19767.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Jul 2025 09:32:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Thu, 28 Aug 2025 17:21:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> these fixes are in the next release Oct 1</p>
]]></description><link>https://forum.magicmirror.builders/post/128077</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/128077</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 28 Aug 2025 17:21:13 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Sun, 13 Jul 2025 22:40:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> thanks for the feedback and extra effort</p>
]]></description><link>https://forum.magicmirror.builders/post/127366</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127366</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 13 Jul 2025 22:40:43 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Sun, 13 Jul 2025 21:56:40 GMT]]></title><description><![CDATA[<p dir="auto">said in <a href="/post/127364">2.32.0 Calendar module limitDays and excludedEvents stopped working</a>:</p>
<blockquote>
<p dir="auto">Previous suggestions to fix the excludedEvents still not working though.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> hold up - it’s all working now! I don’t think I changed anything else, just an extra refresh. So, all your fixes are good. Sorry that took a while to figure out, and if I’d read <a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a>’s  docker instructions properly I think that docker module override feature was probably the cause of earlier confusion.</p>
]]></description><link>https://forum.magicmirror.builders/post/127365</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127365</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Sun, 13 Jul 2025 21:56:40 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Sun, 13 Jul 2025 21:38:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a> aha, good to know, although I already started and now finished setting up from scratch again 🙄 no docker this time … I kept it on a spare sd card though so may switch back.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> new code for limitDays reapplied on a fresh install, still seems fine. Previous suggestions to fix the excludedEvents still not working though.</p>
]]></description><link>https://forum.magicmirror.builders/post/127364</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127364</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Sun, 13 Jul 2025 21:38:24 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Sun, 13 Jul 2025 19:52:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> said in <a href="/post/127359">2.32.0 Calendar module limitDays and excludedEvents stopped working</a>:</p>
<blockquote>
<p dir="auto">I can see this in the docker container logs so I reckon it’s reverting any changes I make there?</p>
</blockquote>
<p dir="auto">yes it overrides the default modules but you can <a href="https://khassel.gitlab.io/magicmirror/docs/configuration.html#default-modules" target="_blank" rel="noopener noreferrer nofollow ugc">change this behavior</a></p>
]]></description><link>https://forum.magicmirror.builders/post/127360</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127360</guid><dc:creator><![CDATA[karsten13]]></dc:creator><pubDate>Sun, 13 Jul 2025 19:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Sun, 13 Jul 2025 17:45:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> no problem, that new code seems to work fine for me.</p>
<p dir="auto">However, I don’t seem to have a great setup for testing - after making the changes, I can load up MM in my remote/laptop browser and immediately see the changes working, but if I try and refresh the electron browser on the raspberry pi running my mirror (using MMM-Remote-Control), it seems to take ages, crash, and then reverts the code back to the docker image default 😮‍💨</p>
<p dir="auto">I can see this in the docker container logs so I reckon it’s reverting any changes I make there?</p>
<pre><code>[entrypoint 18:36:04.283] [INFO]   copy default modules
[entrypoint 18:36:04.918] [INFO]   copy css files
&gt; magicmirror@2.32.0 start
&gt; node --run start:x11
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/127359</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127359</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Sun, 13 Jul 2025 17:45:39 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Sun, 13 Jul 2025 14:22:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> would you be willing to test another implementation of the limitDays code fix</p>
<p dir="auto">another author has changed the code quite a bit,<br />
copy the existing calendar.js so not losing what you have<br />
new code</p>
<pre><code>		if (this.config.limitDays &gt; 0 &amp;&amp; events.length&gt;0) {   // line 708
			// Group all events by date, events on the same date will be in a list with the key being the date.
			Log.info("limitdays starting, events list length=", events.length)
			const eventsByDate = Object.groupBy(events, (ev) =&gt; this.timestampToMoment(ev.startDate).format("YYYY-MM-DD"));
			Log.info("eventsByDate keys=",Object.keys(eventsByDate))
			const newEvents = [];
			let currentDate = moment().subtract(1,'days');
			let daysCollected = 0;

			while (daysCollected &lt; this.config.limitDays) {
				const dateStr = currentDate.format("YYYY-MM-DD");
				Log.info("limitDays checking=",dateStr)
				// Check if there are events on the currentDate
				if (eventsByDate[dateStr])
					Log.info("eventsByDate[",dateStr,"] length=",eventsByDate[dateStr].length)
				if (eventsByDate[dateStr] &amp;&amp; eventsByDate[dateStr].length &gt; 0) {
					// If there are any events today then get all those events and select the currently active events and the events that are starting later in the day.
					newEvents.push(...eventsByDate[dateStr].filter((ev) =&gt; this.timestampToMoment(ev.endDate).isAfter(moment())));
					// Since we found a day with events, increase the daysCollected by 1
					daysCollected++;
					Log.info("limitDays, found day with events, count=",daysCollected)
				}
			        // Search for the next day
				currentDate.add(1, "day");
			}
			Log.info("limitDays done")
			events = newEvents;
		}
</code></pre>
<p dir="auto">this line is unchanged after replacing above code</p>
<pre><code class="language-js">		Log.info(`slicing events total maxcount=${this.config.maximumEntries}`);  // this line is unchanged
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/127358</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127358</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 13 Jul 2025 14:22:56 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Thu, 10 Jul 2025 22:08:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a>  weird…</p>
]]></description><link>https://forum.magicmirror.builders/post/127344</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127344</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 10 Jul 2025 22:08:41 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Thu, 10 Jul 2025 22:06:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> next release isn’t til Oct 1</p>
]]></description><link>https://forum.magicmirror.builders/post/127343</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127343</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 10 Jul 2025 22:06:30 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Thu, 10 Jul 2025 21:30:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> I’ve no idea then, but if you were able to reproduce the issue I had, and then fix it on your end, I probably just messed something up somewhere and without any access to logs on my docker setup that may remain a mystery … I’ve just had another go at trying to figure out what that may be, no luck.</p>
<p dir="auto">No rush at all but I guess if you’re happy with the fix it’ll show up in a new MM version at some point and I’ll update to that.</p>
]]></description><link>https://forum.magicmirror.builders/post/127342</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127342</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Thu, 10 Jul 2025 21:30:13 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 22:09:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> no.</p>
]]></description><link>https://forum.magicmirror.builders/post/127337</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127337</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 22:09:10 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 21:40:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> should I see a console message from loader.js about calendarfetcherutils.js being loaded?</p>
<p dir="auto">I see</p>
<pre><code>Load script: modules/default/calendar/calendar.js
Load script: modules/default/calendar/calendarutils.js
</code></pre>
<p dir="auto">but no mention in the console of calendarfetcherutils.js</p>
]]></description><link>https://forum.magicmirror.builders/post/127336</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127336</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Wed, 09 Jul 2025 21:40:18 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 21:33:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> and</p>
<p dir="auto">the fetcherutils processes this exclude list very early after  getting the events parsed</p>
<pre><code class="language-js">                // loop thru the parsed data, one event at a time
		Object.entries(data).forEach(([key, event]) =&gt; {
			Log.debug("Processing entry...");

			const title = CalendarFetcherUtils.getTitleFromEvent(event);
			Log.debug(`title: ${title}`);

			// Return quickly if event should be excluded.
			let { excluded, eventFilterUntil } = this.shouldEventBeExcluded(config, title);
			if (excluded) {
				return;
			}
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/127335</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127335</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 21:33:54 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 21:30:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> I copied your post in exactly, i reverted back to 2.32 original first</p>
<p dir="auto">and got the right debug and results</p>
<p dir="auto">[2025-07-09 16:27:38.473] [DEBUG] Processing entry…<br />
[2025-07-09 16:27:38.473] [DEBUG] title: Dad’s Birthday<br />
[2025-07-09 16:27:38.473] [LOG]   should be excluded  dad’s birthday birthday false g<br />
[2025-07-09 16:27:38.473] [LOG]   event should be excluded = true, dad’s birthday<br />
[2025-07-09 16:27:38.473] [LOG]   filter applies result = { excluded: true, until: null }<br />
[2025-07-09 16:27:38.473] [LOG]   filter applies returning = { excluded: true, until: null }</p>
]]></description><link>https://forum.magicmirror.builders/post/127334</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127334</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 21:30:16 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 21:25:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> can’t think of any, MM is case sensitive, some times people get the case wrong and we don’t report unexpected parms or missing parms…</p>
<p dir="auto">but you’ve been using that so, it doesn’t shouldn’t be an issue for you</p>
]]></description><link>https://forum.magicmirror.builders/post/127333</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127333</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 21:25:16 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 21:18:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> fair enough, complexity no doubt warranted!</p>
<p dir="auto">Perhaps is there any reason why shouldEventBeExcluded function might not be getting called at all for me? I’m stumped why after making all these changes including console.log messages, nothing is appearing any different -</p>
]]></description><link>https://forum.magicmirror.builders/post/127332</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127332</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Wed, 09 Jul 2025 21:18:51 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 21:15:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> note that the excluded events is an ARRAY (so for loop to look thru them )<br />
test ALL til find one that is true (CalendarFetcherUtils.titleFilterApplies returns true) , or not</p>
<p dir="auto">AND the item in the array can be an object with more specific controls, or a string</p>
<p dir="auto">MM doc entries on separate lines</p>
<pre><code class="language-js">[
'Birthday',     // text 
'Hide This Event',    // text 
{filterBy: 'Payment', until: '6 days', caseSensitive: true},  // complex, but text
{filterBy: '^[0-9]{1,}.*', regex: true} // complex, uses regex
]
</code></pre>
<p dir="auto">AND the list/array can be a MIX of those things,</p>
<p dir="auto">and the string test is the test string is SOMEWHERE in the title, doesn’t have to BE the entire title</p>
]]></description><link>https://forum.magicmirror.builders/post/127331</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127331</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 21:15:30 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 21:06:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> yep that’s what I’ve got, copying below in case I’m missing something …</p>
<p dir="auto">I’ve also added your debug messages back in and changed Log.debug to console.log (as I still can’t get any debug logs from docker but I do get console.log messages from other modules) but nothing comes out in the console log - seems odd that all these changes have had zero effect, am I missing something that might be needed to get these changes to kick in?</p>
<pre><code>        shouldEventBeExcluded (config, title) {
                let result = {  // CHANGED
                        excluded: false,
                        until: null
                };
                for (let f in config.excludedEvents) {
                        let filter = config.excludedEvents[f],
                                testTitle = title.toLowerCase(),
                                until = null,
                                useRegex = false,
                                regexFlags = "g";
                        if (filter instanceof Object) {
                                if (typeof filter.until !== "undefined") {
                                        until = filter.until;
                                }

                                if (typeof filter.regex !== "undefined") {
                                        useRegex = filter.regex;
                                }

                                // If additional advanced filtering is added in, this section
                                // must remain last as we overwrite the filter object with the
                                // filterBy string
                                if (filter.caseSensitive) {
                                        filter = filter.filterBy;
                                        testTitle = title;
                                } else if (useRegex) {
                                        filter = filter.filterBy;
                                        testTitle = title;
                                        regexFlags += "i";
                                } else {
                                        filter = filter.filterBy.toLowerCase();
                                }
                        } else {
                                filter = filter.toLowerCase();
                        }
                        console.log("should be excluded ", testTitle, filter, useRegex, regexFlags)
                        if (CalendarFetcherUtils.titleFilterApplies(testTitle, filter, useRegex, regexFlags)) {
                                if (until) {
                                        result.until = until;  // CHANGED
                                } else {
                                        console.log("event should be excluded = true,", testTitle )
                                        result.excluded = true;  // CHANGED
                                }
                                console.log("filter applies result =", result)
                                break;
                        }
                }
                console.log("filter applies returning =", result)
                return result;  // CHANGED
        },
</code></pre>
<p dir="auto">p.s. just spotted comment on line 12 😅</p>
<pre><code>TODO This seems like an overly complicated way to exclude events based on the title.
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/127330</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127330</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Wed, 09 Jul 2025 21:06:41 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 20:45:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> hm…<br />
my config parm for excluded Events</p>
<p dir="auto">I added one event for saturday… without excluded it shows, with excluded it doesn’t</p>
<pre><code class="language-js">           excludedEvents: [
                'Birthday'
            ],
</code></pre>
<p dir="auto">I checked the changed lines and only see those 4<br />
- is old line<br />
+ is new line</p>
<pre><code class="language-js">         * until: the date until the event should be excluded.
         */
        shouldEventBeExcluded (config, title) {
-               let filter = {
+               let result = {
                        excluded: false,
                        until: null
                };
@@ -52,17 +52,20 @@ const CalendarFetcherUtils = {
                        } else {
                                filter = filter.toLowerCase();
                        }
                       if (CalendarFetcherUtils.titleFilterApplies(testTitle, filter, useRegex, regexFlags)) {                         
                                if (until) {
-                                       filter.until = until;
+                                       result.until = until;
                                } else {
-                                       filter.excluded = true;
+                                       result.excluded = true;
                                }
                                break;
                        }
                }
-               return filter;
+               return result;
        },
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/127327</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127327</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 20:45:38 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 20:26:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> perhaps I’m missing something, but that’s not working for me - it’s made no difference, excluded events are still appearing …  I’ve double checked and can’t spot anything amiss, I’ve made the 4 changes from ‘filter’ to ‘result’?</p>
]]></description><link>https://forum.magicmirror.builders/post/127326</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127326</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Wed, 09 Jul 2025 20:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 20:09:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a>  ok, got it too… this one looks like a javascript difference in scopes…<br />
I added the Log.debug lines, they are not important<br />
modules/default/calendar/calendarfetcherutils.js , starting line 18  (4 changes total)<br />
see  // change this line</p>
<pre><code class="language-js">	shouldEventBeExcluded (config, title) {
		let result = {  // change this line
			excluded: false,
			until: null
		};
		for (let f in config.excludedEvents) {
			let filter = config.excludedEvents[f],  // this line uses the same variable name, filter,   now we have two,
				testTitle = title.toLowerCase(),
				until = null,
				useRegex = false,
				regexFlags = "g";

			if (filter instanceof Object) {  
				if (typeof filter.until !== "undefined") {
					until = filter.until;
				}

				if (typeof filter.regex !== "undefined") {
					useRegex = filter.regex;
				}

				// If additional advanced filtering is added in, this section
				// must remain last as we overwrite the filter object with the
				// filterBy string
				if (filter.caseSensitive) {
					filter = filter.filterBy;
					testTitle = title;
				} else if (useRegex) {
					filter = filter.filterBy;
					testTitle = title;
					regexFlags += "i";
				} else {
					filter = filter.filterBy.toLowerCase();
				}
			} else {
				filter = filter.toLowerCase();
			}
			Log.debug("should be excluded ", testTitle, filter, useRegex, regexFlags)
			if (CalendarFetcherUtils.titleFilterApplies(testTitle, filter, useRegex, regexFlags)) {				
				if (until) {
					result.until = until;  // change this line
				} else {
					Log.debug("event should be excluded = true,", testTitle )
					result.excluded = true;  // change this line
				}
				Log.debug("filter applies result =", result)
				break;
			}
		}
		Log.debug("filter applies returning =", result)
		return result;  // change this line 
	},
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/127325</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127325</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 20:09:22 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 19:32:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> working on it</p>
]]></description><link>https://forum.magicmirror.builders/post/127324</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127324</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 19:32:34 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 19:18:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> nice! Yes that’s fixed the limitDays issue for me …</p>
<p dir="auto">Now, how about part 2 of my issue, the excludedEvents config? The first event showing for me is titled ‘Tutor time’ despite that string being excluded. I’ve tried other terms with/without spaces and nothing seems to work to exclude events any more?</p>
]]></description><link>https://forum.magicmirror.builders/post/127323</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127323</guid><dc:creator><![CDATA[AndyHazz]]></dc:creator><pubDate>Wed, 09 Jul 2025 19:18:52 GMT</pubDate></item><item><title><![CDATA[Reply to 2.32.0 Calendar module limitDays and excludedEvents stopped working on Wed, 09 Jul 2025 17:50:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyhazz" aria-label="Profile: AndyHazz">@<bdi>AndyHazz</bdi></a> found it…</p>
<p dir="auto">comparing date AND TIME oops…</p>
<p dir="auto">edit modules/default/calendar/calendar.js<br />
approx line 708<br />
change the lines marked  below with //</p>
<pre><code>		if (this.config.limitDays &gt; 0) {
			let newEvents = [];
			let lastDate = today.clone().subtract(1, "days").startOf('day');  // add .startOf('day'), note dot
			let days = 0;
			for (const ev of events) {
				let eventDate = this.timestampToMoment(ev.startDate).startOf('day'); // add .startOf('day'), note dot
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/127322</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127322</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 09 Jul 2025 17:50:36 GMT</pubDate></item></channel></rss>