Commit b2c86c9a authored by midgard's avatar midgard

Change date format to something sensible

parent 855488d2
......@@ -37,7 +37,7 @@
<img src="img/{{type}}.png" class="type">
<div class="text">Locatie: {{address}}<br />
{{#if period.start}}
Van {{period.start}} tot {{period.end}}
{{date period.start}} tot {{date period.end}}
{{else}}
Open gedurende het hele jaar.
{{/if}}
......
......@@ -156,4 +156,16 @@ $(document).ready(function() {
var legend = new SimpleControl("#legend-template", christmasSeason ? "holiday-legend" : "legend", {
position: "bottomright"
}).addTo(map);
var monthNames = ["jan.", "feb.", "mrt.", "apr.", "mei", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "dec."];
Handlebars.registerHelper("date", function (ddmyyyy) {
var parts = ddmyyyy.split("-");
var date = parts[0];
var month = monthNames[parts[1] - 1];
var year = parts[2];
return date + " " + month + " " + year;
})
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment