<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks I'll do some testing</div>
<div id="Signature" class="elementToProof">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; color: rgb(0, 0, 0);">
<span class="spanWithBackgroundColor" style="background-color: rgb(255, 255, 255);">--</span></div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<div style="direction: ltr; text-align: left; margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 18px; color: rgb(0, 0, 0);">
Chris Hughes</div>
<div style="direction: ltr; text-align: left; margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 12.79px; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; text-align: left; margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 12.79px; color: rgb(0, 0, 0);">
GIS Analyst</div>
<div style="direction: ltr; text-align: left; margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 10px; color: rgb(0, 0, 0);">
Lincoln County GIS Department </div>
<div style="direction: ltr; text-align: left; margin: 0px; font-size: 10px; color: rgb(0, 0, 0);">
<span style="font-family: Roboto, arial, sans-serif;">880 NE 7th St</span><span style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;">. l Newport, OR 97365</span></div>
<div style="direction: ltr; text-align: left; margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 10px; color: rgb(0, 0, 0);">
Tel: (541) 574 1283</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Dan Little <theduckylittle@gmail.com><br>
<b>Sent:</b> Wednesday, October 7, 2026 1:53 PM<br>
<b>To:</b> Christopher Hughes <chughes@co.lincoln.or.us><br>
<b>Cc:</b> Espoir SINS via GeoMoose-users <geomoose-users@lists.osgeo.org><br>
<b>Subject:</b> Re: [GeoMoose-users] Results Templates - Format Dates</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>While not a totally perfect solution, Javascript's lack of types can be kinda valuable here:</div>
<div><br>
</div>
<div>function normalizeDate(value) {</div>
<div> const d = new Date(value); // this will do a best guess</div>
<div> return (new Intl.DateTimeFormat().format(d)); // this will use the user's locale to format the date</div>
<div>}</div>
<div><br>
</div>
<div>That could be used in a pipe to format arbitrary date values. A little duck-typing/data checking could make it a lot safer.</div>
</div>
<br>
<div class="x_gmail_quote x_gmail_quote_container">
<div dir="ltr" class="x_gmail_attr">On Wed, Oct 7, 2026 at 12:56 PM Christopher Hughes via GeoMoose-users <<a href="mailto:geomoose-users@lists.osgeo.org">geomoose-users@lists.osgeo.org</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-1768901740922613265">
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello everyone,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I was curious if anyone has had success altering date formats specifically in GeoMoose's template results. I've had some success adjusting the results using the pipes found at
<a href="https://github.com/adammark/Markup.js/" id="x_m_-1768901740922613265OWAa8dff807-2184-4377-8e84-f3cf2d2d2c6a" target="_blank">
adammark/Markup.js: Powerful JavaScript templates</a> (i.e. converting results to uppercase/lowercase, adjusting the default null value, replacing one string with another). It does give some examples of how to format dates, but I wasn't sure how to implement
that in GeoMoose's deployment of MarkUp.</div>
<div style="margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The issue is I'm trying to connect to a rest service (so I don't have control of the data at the source). It has a few fields that come through as YYYY-MM-DDTHH:MM:SS-[whatever the UTC modifier is] (which works but is a bit ugly), and a couple that come through
as the number of seconds since 1970 (which is less useful for the average person).</div>
<div style="margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Chris</div>
<div id="x_m_-1768901740922613265Signature">
<div style="font-size:15px; color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)">--</span></div>
<div style="background-color:rgb(255,255,255); margin:0px">
<div style="direction:ltr; text-align:left; margin:0px; font-size:18px; color:rgb(0,0,0)">
Chris Hughes</div>
<div style="direction:ltr; text-align:left; margin:0px; font-size:12.79px; color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr; text-align:left; margin:0px; font-size:12.79px; color:rgb(0,0,0)">
GIS Analyst</div>
<div style="direction:ltr; text-align:left; margin:0px; font-size:10px; color:rgb(0,0,0)">
Lincoln County GIS Department </div>
<div style="direction:ltr; text-align:left; margin:0px; font-size:10px; color:rgb(0,0,0)">
<span style="font-family:Roboto,arial,sans-serif"><a href="https://www.google.com/maps/search/880+NE+7th+St?entry=gmail&source=g">880 NE 7th St</a></span><span>. l Newport, OR 97365</span></div>
<div style="direction:ltr; text-align:left; margin:0px; font-size:10px; color:rgb(0,0,0)">
Tel: <a href="tel:(541)%20574-1283" value="+15415741283" target="_blank">(541) 574 1283</a></div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
</div>
</div>
_______________________________________________<br>
GeoMoose-users mailing list<br>
<a href="mailto:GeoMoose-users@lists.osgeo.org" target="_blank">GeoMoose-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geomoose-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geomoose-users</a><br>
</div>
</blockquote>
</div>
</div>
</body>
</html>