Commit 485c8c30 authored by bmortier's avatar bmortier
Browse files

Merge branch '187-add-an-example-for-d-modifier-where-we-only-use-the-year' into '1.4'

Resolve "Add an example for d modifier where we only use the year"

Closes #187

See merge request fusiondirectory/user-manual!406
Showing with 3 additions and 1 deletion
+3 -1
...@@ -81,6 +81,8 @@ The **d** modifier can be used to generate dates and times. ...@@ -81,6 +81,8 @@ The **d** modifier can be used to generate dates and times.
* First parameter is date string (defaults to “now”) * First parameter is date string (defaults to “now”)
* Second one is date format (defaults to “d.m.Y”, to be used in date fields). * Second one is date format (defaults to “d.m.Y”, to be used in date fields).
By default, the d modifier use %d[now,d.m.Y]|% but if you only want the year you can use %d[now,Y]|%
Examples: Examples:
...@@ -90,7 +92,7 @@ Examples: ...@@ -90,7 +92,7 @@ Examples:
%d[tomorrow]|% 16.03.2017 %d[tomorrow]|% 16.03.2017
%d[today+6days]|% 21.03.2017 %d[today+6days]|% 21.03.2017
%d[now,l jS \of F Y h:i:s A]|% Wednesday 15th of March 2017 02:12:18 PM %d[now,l jS \of F Y h:i:s A]|% Wednesday 15th of March 2017 02:12:18 PM
as POSIX date fields expects a specific format you need to add 'epoch' as second parameter to the d modifier. as POSIX date fields expects a specific format you need to add 'epoch' as second parameter to the d modifier.
.. code-block:: bash .. code-block:: bash
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment