docs: more specific description of strftime

This commit is contained in:
harttle
2020-04-19 13:15:11 +08:00
parent 83b46bd25d
commit 2fa4edaa84
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
title: date
---
Converts a timestamp into another date format. The format for this syntax is the same as [`strftime`](http://strftime.net). The input is first converted to Date object by [new Date()][newDate].
Converts a timestamp into another date format. LiquidJS tries to be conformant with Shopify/Liquid which is using Ruby's core [Time#strftime(string)](http://www.ruby-doc.org/core/Time.html#method-i-strftime). The input is firstly converted to `Date` object via [new Date()][newDate].
Input
```liquid
+1 -1
View File
@@ -2,7 +2,7 @@
title: date
---
把时间戳转换为字符串,这一语法的格式同 [`strftime`](http://strftime.net)。LiquidJS 会先通过 [new Date()][newDate] 尝试把输入转换为 Date 对象。
把时间戳转换为字符串。LiquidJS 尝试跟 Shopify/Liquid 保持一致,它用的是 Ruby 核心的 [Time#strftime(string)](http://www.ruby-doc.org/core/Time.html#method-i-strftime)。此外 LiquidJS 会先通过 [new Date()][newDate] 尝试把输入转换为 Date 对象。
输入
```liquid