我想要了解Jekyll中兩個日期之間的差異。我怎樣才能做到這一點?獲取Jekyll中兩個日期之間的天差
{% capture currentDate %}{{ site.time | date: '%Y-%m-%d' }}{% endcapture %}
{{currentDate}}
{% capture event_date %}{{ entry.date }}{% endcapture %}
{% if event_date < currentDate %}Yes{% else %}No{% endif %}
在入門有我的YAML:
---
title: ChartLine C3
type: charts
description: Chart with round for prisma
id: c3-1
date: 2015-07-18
---
你好,我不明白爲什麼futureDate是必要的。你能解釋我多一點嗎?我想知道過去10天內創建的頁面。 –
@SilvioS。沒有必要,我只是用它作爲另一個例子來表明比較是有效的。 ;) –