krata/_includes/no-zero-date.html

14 lines
327 B
HTML

{% comment %}
Remove the zero padding from a month/day string
{% endcomment %}
{% assign ret = include.date_str %}
{% assign _first_chat = ret | slice: 0 %}
{% if _first_chat == '0' %}
{% assign _last_idx = ret.size | minus: 1 %}
{% assign ret = ret | slice: 1, _last_idx %}
{% endif %}
{{ ret | replace: ' 0', ' ' }}