Fixing warnings of toLocaleDateTimeString()

We are getting this Warning:Date.toLocaleDateTimeString() arguments
Resolution:Use an object-literal to pass extra arguments to toLocaleDateTimeString(), when we are using this statement - Date.parse(XXX).toLocaleDateTimeString(’{“timeZone”:“America/Phoenix”, “format”:“yyyyMMddHHmm”}’). Please let me know your thoughts on this.

Try removing the single quotes, so it reads as Date.parse(XXX).toLocaleDateTimeString({“timeZone”:“America/Phoenix”, “format”:“yyyyMMddHHmm”}).

I believe there was an error in the docs that showed including the single quotes.

please refer an earlier post

Removing quotes worked. Thanks!