I am trying to convert files that have a date in long format (such as "10 September 1966") as part of their name into YYYYMMDD format.
In BRU 3.4.4 JS I seem to be able to successfully do;
Date.parse(longDateString)
and get the correct epoch offset.
But, I get errors trying to use any of the functions that would return this date as a string or as numeric parts for each component.
See, for example;
https://stackoverflow.com/questions/3066586/get-string-in-yyyymmdd-format-from-js-date-object
Ideally, I'd like to use what seems to be the simplest solution;
dateObject.toISOString().slice(0,10).replace(/-/g,"");
But, I get an error trying to use that toISOString() function, although it does seem to be part of the ECMA-262 5th Ed spec.
I know I can brute force this and code my own long date parser, but is there some way I can use the built-in Date object or other datetime functions to do this in a line or two of code? None of the examples on the URL above seem to work in BRU.