Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/templates/date-variable-formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Would be rendered like this:

#### singular=

The `singular=` parameter determines what text to display when the value of a given unit is 1. The default is "one". For example, assuming a date 1 day in the past this:
The `singular=` parameter determines what text to display when the value of a given unit is 1. The default is "one", as in, "one hour ago", and notice that all singular units have the plural "s" removed automatically. For example, assuming a date 1 day in the past this:

{entry_date:relative singular="1"}

Expand All @@ -248,7 +248,7 @@ Or perhaps you would rather show relative dates until midnight:

{entry_date:relative stop="tomorrow" format="%F %d %Y" timezone="Pacific/Tahiti"}

If an invalid value is used for `stop=` a relative date will be displayed.
If an invalid value is used for `stop=` a relative date will be displayed in all cases.

#### units=

Expand All @@ -270,6 +270,8 @@ Would be rendered like this:

one week ago

Note that the plural "s" is automatically removed because it's a single week.

But this:

{entry_date:relative units="days"}
Expand Down