I Propose adding date-fns library, I see retool uses moment, but even on the moment docs website themselves they state that moment is no longer a good option for modern javascript usage.
I think date-fns is a more modern solution that a lot of developers are familiar with as well.
I just found out, at least in workflows if I do const dateFns = require("date-fns");
it actually works