我想要了解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。没有必要,我只是用它作为另一个例子来表明比较是有效的。 ;) –