From 1a1513032d0343a67754e99c3aea4d5946fea891 Mon Sep 17 00:00:00 2001 From: bmortier <benoit.mortier@fusiondirectory.org> Date: Thu, 28 Sep 2023 14:11:09 +0000 Subject: [PATCH] Resolve "Add an example for d modifier where we only use the year" --- source/fusiondirectory/templates/macro.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/fusiondirectory/templates/macro.rst b/source/fusiondirectory/templates/macro.rst index 276c20d1..f9d06cb9 100644 --- a/source/fusiondirectory/templates/macro.rst +++ b/source/fusiondirectory/templates/macro.rst @@ -81,6 +81,8 @@ The **d** modifier can be used to generate dates and times. * First parameter is date string (defaults to “nowâ€) * 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: @@ -90,7 +92,7 @@ Examples: %d[tomorrow]|% 16.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 - + as POSIX date fields expects a specific format you need to add 'epoch' as second parameter to the d modifier. .. code-block:: bash -- GitLab