I am trying to use this code:
{% let d = now %}
{% let frMonths = ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"] %}
{% let month=getMonth(d)%} {{frMonths}} {%= formatDate(d, "dd, YYYY") %}
To output the current date in French as below:
mars 28, 2023
But what I am getting back when I simulate content is:
List(janvier, février, mars, avril, mai, juin, juillet, août, septembre, octobre, novembre, décembre) 28, 2023
Does anyone know how I can achieve just the "mars" in the Month section?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi, I have done something similar using an IF statement. Hope this could help
{% let d=now %}
{% let m=getMonth(d)%}
{% let frMonths=""%}
{%#if m=1 %}
{% let frMonths="janvier"%}
{% else if m=2 %}
{% let frMonths="février"%}
{% else if m=3 %}
{% let frMonths="mars"%}
{% else if m=4 %}
{% let frMonths="avril"%}
{%/if%}
{{frMonths}} {%= formatDate(d, "dd, YYYY") %}
Hi, I have done something similar using an IF statement. Hope this could help
{% let d=now %}
{% let m=getMonth(d)%}
{% let frMonths=""%}
{%#if m=1 %}
{% let frMonths="janvier"%}
{% else if m=2 %}
{% let frMonths="février"%}
{% else if m=3 %}
{% let frMonths="mars"%}
{% else if m=4 %}
{% let frMonths="avril"%}
{%/if%}
{{frMonths}} {%= formatDate(d, "dd, YYYY") %}
Thank you! This worked.
Do you have an online resource regarding the PQL language for use in AJO?
Views
Replies
Total Likes
Hi @DjTFox can we have or condition in IF conditions
Views
Replies
Total Likes