错别字3 - 明天的液体约会



如何使用f:format.date在流体中获取明天的日期?

我需要在流体中做if条件检查活动日期是否早于明天。非常感谢。

您可以在f:format.date中使用strtotime字符串,因此您可以使用{f:format.date(date: 'tomorrow')}来获取明天的日期,并将其与您的日期进行比较。类似于:

<f:if condition="{event.date} < {f:format.date(date: 'tomorrow')}">
<f:then>
Earlier than tomorrow
</f:then>
<f:else>
Not earlier than tomorrow
</f:else>
</f:if>

最新更新