Change date format to something sensible
This commit is contained in:
parent
855488d227
commit
b2c86c9a94
2 changed files with 13 additions and 1 deletions
|
@ -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;
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue