Getting an error when I format date string


I have a few actions that use a script line like:

Draft.content ="dddd, MMM d")

This used to work, but after one of the recent updates (not sure exactly which) I started getting this error:

Script Error: RangeError: toString() radix argument must be between 2 and 36

I looked through the update notes and didn’t see anything that explained this. How should I change my script so it will work again?


Try this and it is returning a numeric value.


Then take a look at this for the error you’re seeing.

You can take a look at the links there or just do a Google search for formatting dates in Javascript. Alternatively take a look at the action belowin the directory for inspiration.



I was actually able to fix it easily just by changing to

That seems to be working well for me. Thanks for your help!