Hello all.
I can found shift on date function but i can't found shift function on calendar.
You have info ?
Big thanks
{formdate: D MMMM YYYY}
Hello all.
I can found shift on date function but i can't found shift function on calendar.
You have info ?
Big thanks
{formdate: D MMMM YYYY}
Hi @Emmett,
Welcome to the forum
You can do that by specifying the formatter
function where I am using:
datetimeparse
to convert the value into the standard formatdatetimeadd
to perform the shiftdatetimeformat
to convert it back to the required format{formdate: D MMMM YYYY; formatter=(value) -> datetimeformat(datetimeadd(datetimeparse(value, "D MMMM YYYY"), 9, "D"), "D MMMM YYYY"); name=date}
I can't use it. This does not apply, in your case, 9 days more.
If it's possible, i have idea.
For example, today is the 12th, is it possible then, when I select the 12th, it says the word "today" instead of the date, if I select the next day , on the 13th, it is indicated instead of the date "tomorrow", and beyond that it indicates the completely normal date.
{formdate: YYYY-MM-DD; name=date}
{time: YYYY-MM-DD; at={=date}; pattern=YYYY-MM-DD }
Hi @Emmett,
I am not sure if I understood your use case correctly, but this snippet produces the expected result.
{formdate: YYYY-MM-DD; name=date}
{today_date=datetimeformat(now(), "YYYY-MM-DD")}{if: date=today_date}today{elseif: date=datetimeformat(datetimeadd(today_date,1,"D"), "YYYY-MM-DD")}tomorrow{else}{=date}{endif}
It's totally that ! Very powerfull.
I adapt but i have a bug. I convert date for French version but there is an error.
With "dddd D MMMM YYYY"
{formdate: dddd D MMMM YYYY; name=date}
{today_date=datetimeformat(now(), "dddd D MMMM YYYY")}
{if: date=today_date}today{elseif: date=datetimeformat(datetimeadd(today_date,1,"D"), "dddd D MMMM YYYY")}tomorrow{else}{=date}{endif}
Actually, you have to convert today_date
into a standard format using datetimeparse
before shifting it. I have made the required changes.
{formdate: dddd D MMMM YYYY; name=date}
{today_date=datetimeformat(now(), "dddd D MMMM YYYY")}
{if: date=today_date}today{elseif: date=datetimeformat(datetimeadd(datetimeparse(today_date, "dddd D MMMM YYYY"),1,"D"), "dddd D MMMM YYYY")}tomorrow{else}{=date}{endif}
Powerfull !!!!!! Big thanks