<?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[Do you need to list moment and moment-timezone as dependencies in modules?]]></title><description><![CDATA[<p dir="auto">I maintain a couple modules that depend on the moment or moment-timezone dependency.  I had always listed those in package.json and asked users to npm install them.</p>
<p dir="auto">But I just took over another module that I found relies on moment without installing it at the module level.  The only reason I found this out is that I was working on something and got an error message that the module was looking for moment in the parent directory (/home/mmuser/MagicMirror/node_modules/moment/moment.js:2613:19).</p>
<p dir="auto">So, do I really need to ask users to install moment and/or moment-timezone, or is it safe to simply rely on the installation that comes with the the MagicMirror application itself??</p>
]]></description><link>https://forum.magicmirror.builders/topic/19695/do-you-need-to-list-moment-and-moment-timezone-as-dependencies-in-modules</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 18:34:03 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19695.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 May 2025 01:12:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Thu, 29 May 2025 22:14:25 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> Maybe I’m wrong, and I haven’t spent a lot of time trying to test it, but I think regular moment will grab the date in the local timezone based on what is set in the system.  You can’t do as much with OTHER timezones in regular moment, but I think at least that works.  Whereas the regular javascript <code>date</code> will pull the date and time in UTC.  That said, I do use moment-timezone in my modules–though some of them I have taken over maintaining, and they used regular moment to some success.</p>
]]></description><link>https://forum.magicmirror.builders/post/126786</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126786</guid><dc:creator><![CDATA[dathbe]]></dc:creator><pubDate>Thu, 29 May 2025 22:14:25 GMT</pubDate></item><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Thu, 29 May 2025 22:06:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dathbe" aria-label="Profile: dathbe">@<bdi>dathbe</bdi></a> you need moment.timezone</p>
]]></description><link>https://forum.magicmirror.builders/post/126785</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126785</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 29 May 2025 22:06:46 GMT</pubDate></item><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Thu, 29 May 2025 21:59:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bkeyport" aria-label="Profile: BKeyport">@<bdi>BKeyport</bdi></a> I couldn’t get timezones working properly.  So, for example, if you want to know what day it is, and you’re not on UTC, you’re liable to pull tomorrow’s date.  Maybe I don’t know how to do it, but moment is pretty lightweight and makes a few things slightly easier.</p>
]]></description><link>https://forum.magicmirror.builders/post/126784</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126784</guid><dc:creator><![CDATA[dathbe]]></dc:creator><pubDate>Thu, 29 May 2025 21:59:04 GMT</pubDate></item><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Thu, 29 May 2025 21:58:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kristjanesperanto" aria-label="Profile: KristjanESPERANTO">@<bdi>KristjanESPERANTO</bdi></a>  - while true, I also plan to replace moment when temporal is available</p>
]]></description><link>https://forum.magicmirror.builders/post/126783</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126783</guid><dc:creator><![CDATA[dathbe]]></dc:creator><pubDate>Thu, 29 May 2025 21:58:08 GMT</pubDate></item><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Fri, 23 May 2025 12:57:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kristjanesperanto" aria-label="Profile: KristjanESPERANTO">@<bdi>KristjanESPERANTO</bdi></a> I’ve noticed that it seems that most of the functions of moment is in vanilla javascript - at least in what we typically use.</p>
]]></description><link>https://forum.magicmirror.builders/post/126692</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126692</guid><dc:creator><![CDATA[BKeyport]]></dc:creator><pubDate>Fri, 23 May 2025 12:57:56 GMT</pubDate></item><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Fri, 23 May 2025 09:13:19 GMT]]></title><description><![CDATA[<p dir="auto">I underline Sam’s answer. Since moment is no longer being actively developed and the <a href="https://momentjs.com/docs/#/-project-status/future/" target="_blank" rel="noopener noreferrer nofollow ugc">Temporal API</a> is on the horizon, I’m pretty sure <code>moment</code> will be replaced at some point.</p>
]]></description><link>https://forum.magicmirror.builders/post/126691</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126691</guid><dc:creator><![CDATA[KristjanESPERANTO]]></dc:creator><pubDate>Fri, 23 May 2025 09:13:19 GMT</pubDate></item><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Fri, 23 May 2025 01:26:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dathbe" aria-label="Profile: dathbe">@<bdi>dathbe</bdi></a> you should list them , we can change the base at any time.  there have been discussions to move away from moment.</p>
<p dir="auto">we moved away from request, and etc,etc…</p>
<p dir="auto">if you do require(x)<br />
then you should list x in package.json</p>
]]></description><link>https://forum.magicmirror.builders/post/126686</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126686</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 23 May 2025 01:26:20 GMT</pubDate></item><item><title><![CDATA[Reply to Do you need to list moment and moment-timezone as dependencies in modules? on Fri, 23 May 2025 01:12:46 GMT]]></title><description><![CDATA[<p dir="auto">P.S. I did test it, and it seems to work with moment-timezone as well.</p>
]]></description><link>https://forum.magicmirror.builders/post/126683</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/126683</guid><dc:creator><![CDATA[dathbe]]></dc:creator><pubDate>Fri, 23 May 2025 01:12:46 GMT</pubDate></item></channel></rss>