-
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
305 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: date_to_long_string | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
Convert a date to long format. Same with Jekyll `date_to_long_string` filter. | ||
|
||
Input | ||
```liquid | ||
{{ site.time | date_to_long_string }} | ||
``` | ||
|
||
Output | ||
```text | ||
07 November 2008 | ||
``` | ||
|
||
Input | ||
```liquid | ||
{{ site.time | date_to_long_string: "ordinal" }} | ||
``` | ||
|
||
Output | ||
```text | ||
7th November 2008 | ||
``` | ||
|
||
Note that JavaScript `Date` has not timezone information, see [date][date] filter for details. | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: date_to_rfc822 | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
Convert a Date into the RFC-822 format used for RSS feeds, same as Jekyll filter `date_to_rfc822`. | ||
|
||
Input | ||
```liquid | ||
{{ site.time | date_to_rfc822 }} | ||
``` | ||
|
||
Output | ||
```text | ||
Mon, 07 Nov 2008 13:07:54 -0800 | ||
``` | ||
|
||
Note that JavaScript `Date` has not timezone information, see [date][date] filter for details. | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: date_to_string | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
Convert a date to short format. Same with Jekyll `date_to_string` filter. | ||
|
||
Input | ||
```liquid | ||
{{ site.time | date_to_string }} | ||
``` | ||
|
||
Output | ||
```text | ||
07 Nov 2008 | ||
``` | ||
|
||
Input | ||
```liquid | ||
{{ site.time | date_to_string: "ordinal", "US" }} | ||
``` | ||
|
||
Output | ||
```text | ||
Nov 7th, 2008 | ||
``` | ||
|
||
Note that JavaScript `Date` has not timezone information, see [date][date] filter for details. | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: date_to_xmlschema | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
Convert a Date into XML Schema (ISO 8601) format, same as Jekyll filter `date_to_xmlschema`. | ||
|
||
Input | ||
```liquid | ||
{{ site.time | date_to_xmlschema }} | ||
``` | ||
|
||
Output | ||
```text | ||
2008-11-07T13:07:54-08:00 | ||
``` | ||
|
||
Note that JavaScript `Date` has not timezone information, see [date][date] filter for details. | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: date_to_long_string | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
把日期转换为长格式(只支持 US/UK 两种),与 Jekyll 的 `date_to_long_string` 过滤器一样。 | ||
|
||
输入 | ||
```liquid | ||
{{ site.time | date_to_long_string }} | ||
``` | ||
|
||
输出 | ||
```text | ||
07 November 2008 | ||
``` | ||
|
||
输入 | ||
```liquid | ||
{{ site.time | date_to_long_string: "ordinal" }} | ||
``` | ||
|
||
输出 | ||
```text | ||
7th November 2008 | ||
``` | ||
|
||
|
||
注意 JavaScript `Date` 没有时区信息,详情请参考 [date][date] 过滤器。 | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: date_to_rfc822 | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
把日期转换为 RFC-822 格式用于 RSS feed,与 Jekyll 的 `date_to_rfc822` 过滤器一样。 | ||
|
||
输入 | ||
```liquid | ||
{{ site.time | date_to_rfc822 }} | ||
``` | ||
|
||
输入 | ||
```text | ||
Mon, 07 Nov 2008 13:07:54 -0800 | ||
``` | ||
|
||
注意 JavaScript `Date` 没有时区信息,详情请参考 [date][date] 过滤器。 | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: date_to_string | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
把日期转换为短格式(只支持 US/UK 两种),与 Jekyll 的 `date_to_string` 过滤器一样。 | ||
|
||
输入 | ||
```liquid | ||
{{ site.time | date_to_string }} | ||
``` | ||
|
||
输出 | ||
```text | ||
07 Nov 2008 | ||
``` | ||
|
||
输入 | ||
```liquid | ||
{{ site.time | date_to_string: "ordinal", "US" }} | ||
``` | ||
|
||
输出 | ||
```text | ||
Nov 7th, 2008 | ||
``` | ||
|
||
注意 JavaScript `Date` 没有时区信息,详情请参考 [date][date] 过滤器。 | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: date_to_xmlschema | ||
--- | ||
{% since %}v10.13.0{% endsince %} | ||
|
||
把日期转换为 XML Schema (ISO 8601) 格式,与 Jekyll 的 `date_to_xmlschema` 过滤器一样。 | ||
|
||
输入 | ||
```liquid | ||
{{ site.time | date_to_xmlschema }} | ||
``` | ||
|
||
输出 | ||
```text | ||
2008-11-07T13:07:54-08:00 | ||
``` | ||
|
||
注意 JavaScript `Date` 没有时区信息,详情请参考 [date][date] 过滤器。 | ||
|
||
[date]: ./date.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.