Any idea why this IF node isnt working?

Any idea why this if node isn’t working?

What version are you running? I suspect the issue could be with the toLocaleDateString not working as expected. If you did something crazy like adding toString() after it does that work?

I’m on this docker version


adding .toString() after doesnt work

wonder if i can bodge it using a switch node for now

no its doing the same using equls in the switch node too.

That is odd, So if I use a different expression like {{ ${days: 2}).format('dd/MM/yyyy').toString() }} it works as expected so it looks like something funky is happening with the toLocalDateString() I am just not sure what.

I think we have a couple of issues opened when doing things with times in the If node but for now I would probably use the fancier version which should get you by.

I had to do this to get it working

That is some crazy stuff there, I wonder why all of that is needed unless we do something odd like display the date using the browser locale and run the workflow using the instance locale. Did the shorter one not work for you like it did for me?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.