Browse Source

Document twig filter 'osmDateFormat'

master
parent
commit
cd894501e3
  1. 1
      doc/TwigJS.md
  2. 2
      lib/modulekit/form

1
doc/TwigJS.md

@ -65,6 +65,7 @@ Extra filters:
* filter websiteUrl: return a valid http link. Example: `{{ "www.google.com"|websiteUrl }}` -> "http://www.google.com"; `{{ "https://google.com"|websiteUrl }}` -> "https://google.com"
* filter `matches`: regular expression match. e.g. `{{ "test"|matches("e(st)$") }}` returns `[ "est", "st" ]`. Returns null if it does not match.
* filter `osmDateParse`: returns an array with the lower and upper boundary of the year of a `start_date` tag. See [https://github.com/plepe/openstreetmap-date-parser](openstreetmap-date-parser) for details.
* filter `osmDateFormat`: returns the date as localized strings. Accept an object for options, e.g. `{{ tags.start_date|osmDateFormat({ format: 'short' }) }}`. See [https://github.com/plepe/openstreetmap-date-format](openstreetmap-date-format) for details.
* filter `natsort`: Sort an array naturally, see [https://www.npmjs.com/package/natsort](natsort) for details.
* filter `unique`: Remove duplicate elements from an array.
* filter `md5`: calculate md5 hash of a string.

2
lib/modulekit/form

@ -1 +1 @@
Subproject commit 5d39b2f61b7eda9a635414acaeb3c4e0dc524490
Subproject commit 50f1ea5eb822240876ed89504e3180f9c7dcbc05
Loading…
Cancel
Save