<?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[Should these be equivalent print statements and if not why not?]]></title><description><![CDATA[<pre><code>     print(pointsList[k].runtime.prev(HOUR, 1).sum);
     print(pointsList[k].runtime.prev(MINUTE, 60).sum);
</code></pre>
]]></description><link>https://forum.mango-os.com/topic/3974/should-these-be-equivalent-print-statements-and-if-not-why-not</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Nov 2026 09:04:05 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3974.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Dec 2018 02:03:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Should these be equivalent print statements and if not why not? on Sat, 22 Dec 2018 19:56:57 GMT]]></title><description><![CDATA[<p dir="auto">Sorry I should have qualified that question. I meant if they were run exactly on the hour would they be equivalent?</p>
]]></description><link>https://forum.mango-os.com/post/20819</link><guid isPermaLink="true">https://forum.mango-os.com/post/20819</guid><dc:creator><![CDATA[Phillip Weeks]]></dc:creator><pubDate>Sat, 22 Dec 2018 19:56:57 GMT</pubDate></item><item><title><![CDATA[Reply to Should these be equivalent print statements and if not why not? on Fri, 21 Dec 2018 17:25:55 GMT]]></title><description><![CDATA[<p dir="auto">No, they are not equivalent. As described in the documentation, <a href="https://help.infiniteautomation.com/about-mango-java-script/" rel="nofollow ugc">https://help.infiniteautomation.com/about-mango-java-script/</a> (and in the context help blue (?) for the script), the previous function aligns the period boundaries based on the period type and not by both the period type and the number of periods. So, if you ran those at 1:15:23 PM, the first would get data from 12:00PM(inclusive) to 1:00PM(exclusive) where the second would be over 12:15-1:15PM</p>
]]></description><link>https://forum.mango-os.com/post/20806</link><guid isPermaLink="true">https://forum.mango-os.com/post/20806</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 21 Dec 2018 17:25:55 GMT</pubDate></item></channel></rss>