Last active
August 26, 2016 23:28
-
-
Save andormade/04fdcdeda585e97162ec558677ec5c01 to your computer and use it in GitHub Desktop.
It does Hungarian date format for Liquid templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Usage: {% include hungariandate.liquid date=post.date %} | |
or: {% include hungariandate.liquid date=page.date %} | |
2016 Andor Polgar (andor.cool) | |
{% endcomment %} | |
{{ include.date | date: "%Y." }} | |
{% assign m = include.date | date: "%-m" %} | |
{% case m %} | |
{% when '1' %} január | |
{% when '2' %} február | |
{% when '3' %} március | |
{% when '4' %} április | |
{% when '5' %} május | |
{% when '6' %} június | |
{% when '7' %} július | |
{% when '8' %} augusztus | |
{% when '9' %} szeptember | |
{% when '10' %} október | |
{% when '11' %} november | |
{% when '12' %} december | |
{% endcase %} | |
{{ include.date | date: "%-d." }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment