Hello,
I’m trying to get the following to diplay the date and time without the timezone:
var d = new Date()
console.debug(d.toLocaleString(Qt.locale(“en-US”))
which currently returns
”Friday, June 1, 2018 9:17:44 AM Alaskan Daylight Time”.
I’d like to change how this is returned, primarily I want to remove the timezone information. However, when I try to use options as described at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString, I get an invalid date format error.
If I do something like (but with all the output I want)
console.debug(d.toLocaleString(Qt.locale(“en-US”), “M-yyyy”)
It seems to remove the auto-format that I want from toLocaleString.
Is there any way to pass options so that only the actual date/time elements I want to display are actually displayed but the auto-format is preserved?
Thank you,
Eric