Skip to content

Commit 023d09a

Browse files
authored
Update date-variable-formatting.md
A little text tweaking about singular usage
1 parent d8778b0 commit 023d09a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/templates/date-variable-formatting.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Would be rendered like this:
228228

229229
#### singular=
230230

231-
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:
231+
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:
232232

233233
{entry_date:relative singular="1"}
234234

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

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

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

253253
#### units=
254254

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

271271
one week ago
272272

273+
Note that the plural "s" is automatically removed because it's a single week.
274+
273275
But this:
274276

275277
{entry_date:relative units="days"}

0 commit comments

Comments
 (0)