<?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[System Time]]></title><description><![CDATA[<p dir="auto">I need to display the time in DGLux, however the system time is e.g. Tue Nov 17 HH:MM:SS WAST 2015 - how can I change this format to be Tuesday 17 November 2015 HH:MM for example.</p>
]]></description><link>https://forum.mango-os.com/topic/2021/system-time</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 13:34:43 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2021.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Nov 2015 13:48:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to System Time on Thu, 19 Nov 2015 06:19:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phildunlap" aria-label="Profile: phildunlap">@<bdi>phildunlap</bdi></a></p>
<p dir="auto">Here is my solution maybe not the neatest script but it works</p>
<p dir="auto">var date = new Date();<br />
minutes = date.getMinutes();<br />
seconds = date.getSeconds();<br />
hour = date.getHours();<br />
year = date.getFullYear();<br />
day = date.getDay();<br />
month = date.getMonth();<br />
dates = date.getDate();</p>
<p dir="auto">if (minutes &lt; 10)<br />
{<br />
min = "0" + minutes;<br />
}<br />
else<br />
{<br />
min = minutes;<br />
}</p>
<p dir="auto">if (day == 0)<br />
{<br />
strday = "Sunday";<br />
}<br />
if (day == 1)<br />
{<br />
strday = "Monday";<br />
}<br />
if (day == 2)<br />
{<br />
strday = "Tuesday";<br />
}<br />
if (day == 3)<br />
{<br />
strday = "Wednesday";<br />
}<br />
if (day == 4)<br />
{<br />
strday = "Thursday";<br />
}<br />
if (day == 5)<br />
{<br />
strday = "Friday";<br />
}<br />
if (day == 6)<br />
{<br />
strday = "Saturday";<br />
}</p>
<p dir="auto">if (month == 0)<br />
{<br />
strmonth = "January";<br />
}<br />
if (month == 1)<br />
{<br />
strmonth = "February";<br />
}<br />
if (month == 2)<br />
{<br />
strmonth = "March";<br />
}<br />
if (month == 3)<br />
{<br />
strmonth = "April";<br />
}<br />
if (month == 4)<br />
{<br />
strmonth = "May";<br />
}<br />
if (month == 5)<br />
{<br />
strmonth = "June";<br />
}<br />
if (month == 6)<br />
{<br />
strmonth = "July";<br />
}<br />
if (month == 7)<br />
{<br />
strmonth = "August";<br />
}<br />
if (month == 8)<br />
{<br />
strmonth = "September";<br />
}<br />
if (month == 9)<br />
{<br />
strmonth = "October";<br />
}<br />
if (month == 10)<br />
{<br />
strmonth = "November";<br />
}<br />
if (month == 11)<br />
{<br />
strmonth = "December";<br />
}</p>
<p dir="auto">strDated = strday + "," + " " + dates + " " + strmonth + " " + year;</p>
<p dir="auto">strTimes = hour + ":" + min;</p>
]]></description><link>https://forum.mango-os.com/post/10576</link><guid isPermaLink="true">https://forum.mango-os.com/post/10576</guid><dc:creator><![CDATA[alexcclarke]]></dc:creator><pubDate>Thu, 19 Nov 2015 06:19:37 GMT</pubDate></item><item><title><![CDATA[Reply to System Time on Wed, 18 Nov 2015 14:57:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexcclarke" aria-label="Profile: alexcclarke">@<bdi>alexcclarke</bdi></a></p>
<p dir="auto">That could have been a missing curly brace in the second switch. I found myself thinking the way I suggested wasn't the DGLux way as I was falling asleep last night. I think you may find it easier to have a script triggered by a timer (bind the count to a property of the script, make the script execute on change), sets output = new Date(). Next double click that string property and bind it to the input for a date formatter widget, and you can use normal format strings to get it how you'd like. I think that pattern is:</p>
<p dir="auto">EEEE D MMMM YYYY at H:NN     ====   for 24 hour time<br />
EEEE D MMMM YYYY at L:NN A  ====   for AM/PM 12 hour time</p>
<p dir="auto">I will also go and edit my script to make it easier to get working.</p>
<p dir="auto">You can find more information on format strings at <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/formatters/DateFormatter.html" rel="nofollow ugc">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/formatters/DateFormatter.html</a></p>
]]></description><link>https://forum.mango-os.com/post/10574</link><guid isPermaLink="true">https://forum.mango-os.com/post/10574</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Wed, 18 Nov 2015 14:57:45 GMT</pubDate></item><item><title><![CDATA[Reply to System Time on Wed, 18 Nov 2015 10:58:47 GMT]]></title><description><![CDATA[<p dir="auto">I'm struggling to get this to work....<br />
Error: Unexpected end of file - just trying to get the week day to work for now.</p>
]]></description><link>https://forum.mango-os.com/post/10571</link><guid isPermaLink="true">https://forum.mango-os.com/post/10571</guid><dc:creator><![CDATA[alexcclarke]]></dc:creator><pubDate>Wed, 18 Nov 2015 10:58:47 GMT</pubDate></item><item><title><![CDATA[Reply to System Time on Wed, 18 Nov 2015 14:56:56 GMT]]></title><description><![CDATA[<p dir="auto">Are you trying to display user time or server time?</p>
<p dir="auto">To display user time, you can have a script element with an output string property --&gt;</p>
<p dir="auto">function getDayText( num ) {<br />
switch (num) {<br />
case 0 :<br />
return "Sunday";<br />
case 1 :<br />
return "Monday";<br />
case 2:<br />
return "Tuesday";<br />
case 3:<br />
return "Wednesday";<br />
case 4:<br />
return "Thursday";<br />
case 5:<br />
return "Friday";<br />
case 6:<br />
return "Saturday";<br />
}<br />
}</p>
<p dir="auto">function getMonthText( num ) {<br />
switch (num) {<br />
case 0:<br />
return "January";<br />
case 10:<br />
return "November";<br />
default:<br />
return "default";<br />
}<br />
}</p>
<p dir="auto">function pad( num ) {<br />
if( num &lt; 10 )<br />
return "0" + num;<br />
return num;<br />
}</p>
<p dir="auto">var now = new Date();<br />
var output = getDayText( now.getDay() ) + " " + now.getDate() + " " + getMonthText( now.getMonth() ) + " " + now.getHours() + ":" + pad( now.getMinutes() );</p>
<p dir="auto">I am just get reacquainted with some things, but I do not believe there is access to date formatting classes in the DGScript. They do have a date formatter widget that I believe you should be able to bind a running timestamp (a simple script where output=now.toLocaleString(); ) to the date time formatter widget.</p>
]]></description><link>https://forum.mango-os.com/post/10568</link><guid isPermaLink="true">https://forum.mango-os.com/post/10568</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Wed, 18 Nov 2015 14:56:56 GMT</pubDate></item></channel></rss>