From 9634f7acbc139261a916b1ce5b61f08e787ce8b9 Mon Sep 17 00:00:00 2001 From: Pat Date: Mon, 4 Feb 2019 21:31:02 -0500 Subject: [PATCH] Regex to remove year from forecast date locale Creates a short date. Updates #56 --- skins/Belchertown/index.html.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skins/Belchertown/index.html.tmpl b/skins/Belchertown/index.html.tmpl index bdbaa508..1577b350 100644 --- a/skins/Belchertown/index.html.tmpl +++ b/skins/Belchertown/index.html.tmpl @@ -376,7 +376,7 @@ var weekday = "Today"; } else { output_html += '
'; - var weekday = moment.unix( data["daily"]["data"][i]["time"] ).format( "ddd M/D" ); + var weekday = moment.unix( data["daily"]["data"][i]["time"] ).format( "ddd l" ).replace(/([A-Z])|[\/\-\.]\b[0-9]{4}\b/g, ' $1'); // Removes "/Year", ".Year" and/or "-Year" - https://stackoverflow.com/a/12704805/1177153 } output_html += ''+weekday+''; output_html += '
';