on master help sign in
Urbit.org: Remove leading zeroes in date

eg. ~2019.9.4 instead of leading zeroes.

commit0a857a331ae93db569c87d5ace6ac2b2190c1ad7 authorMatilde Park <matilde@tlon.io> dateWed 4 Sep 2019, 12:08 (7 years ago) parent1ea7b3a
4 files changed+4−4
templates/index.html+1−1 templates/page.html+1−1 templates/posts/list.html+1−1 templates/posts/single.html+1−1
templates/index.html+1−1
@@ -33,7 +33,7 @@
3333 {% for page in s.pages | slice(end=2) %}
3434 <a class="block fw-bold mt4 mb1" href="{{ page.permalink }}">{{ page.title }}</a>
3535 <address class="mono block mv1">{{ page.extra.ship }}</address>
36− <time class="mono mr3">{{ page.date | date(format="~%Y.%m.%d") }}</time>
36+ <time class="mono mr3">{{ page.date | date(format="~%Y.%-m.%-d") }}</time>
3737 <a class="mono" href="/posts/{{page.taxonomies.posts[0] | lower}}">
3838 {{ page.taxonomies.posts[0] | lower}}
3939 </a>
templates/page.html+1−1
@@ -23,7 +23,7 @@
2323 <address class="mono">{{ page.extra.ship }}</address>
2424 {% endif %}
2525 {% if page.date %}
26− <time class="mono block f5">~{{page.date}}</time>
26+ <time class="mono block f5">~{{page.date | date(format="~%Y.%-m.%-d") }}</time>
2727 {% endif %}
2828 {% endif %}
2929 </article>
templates/posts/list.html+1−1
@@ -30,7 +30,7 @@
3030 {% set posts = get_section(path="posts/_index.md") %}
3131 {% for page in posts.pages %}
3232 <li>
33− <span>&#126;{{ page.date | date(format="%Y.%m.%d") }}</span>
33+ <span>&#126;{{ page.date | date(format="~%Y.%-m.%-d") }}</span>
3434 <span>
3535 {% if page.taxonomies.posts %}
3636 {% for post in page.taxonomies.posts %}
templates/posts/single.html+1−1
@@ -17,7 +17,7 @@
1717 <li class="mb6 mt6">
1818 <h2 class="mb1"><a class="bb0" href="{{ page.permalink }}">{{ page.title }}</a></h2>
1919 <p class="mb2 mt2">{{ page.description }}</p>
20− <span class="mono f5">&#126;{{ page.date | date(format="%Y.%m.%d") }}</span>
20+ <span class="mono f5">&#126;{{ page.date | date(format="~%Y.%-m.%-d") }}</span>
2121 <span class="mono f5">
2222 {% if page.taxonomies.posts %}
2323 {% for post in page.taxonomies.posts %}