You can use

new Date(date).toLocaleDateString();
Answer from Viplav Soni on Stack Overflow
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-typeerror-tolocaledatestring-is-not-a-function
TypeError: toLocaleDateString is not a function in JS [Fix] | bobbyhadz
The "toLocaleDateString is not a function" error occurs when the `toLocaleDateString()` method is called on a value that is not a date object.
Discussions

TypeError: this.time.toLocaleTimeString is not a function
Try converting the timestring into a date object then you can get the localetimestring. Example: let d = new Date(this.timeString) let t = d.toLocaleTimeString() console.log(t) More on reddit.com
🌐 r/GoogleAppsScript
2
4
March 3, 2021
Bug Report - Other: TypeError: _a.toLocaleDateString is not a function
Vortex Version: 1.11.0-beta Memory: 31.87 GB System: win32 x64 (10.0.22631) Component rendering error Vortex Version: 1.11.0-beta, TypeError: _a.toLocaleDateString is not a function at remainingBar (C:\Users\Paint\AppData\Roaming\Vortex\... More on github.com
🌐 github.com
8
April 20, 2024
How to parse string date to something friendly
Hello there, I always get confused on how to parse date strings to something readable. I’ve the following string: "2020-07-02T17:06:52.739Z" How do I parse this string in JavaScript to be something like: June 17, 2020. (Or something like this… friendly and readable); More on forum.freecodecamp.org
🌐 forum.freecodecamp.org
1
0
July 5, 2020
toLocaleDateString is not a function in react jsx render
Im trying to convert my date into a readable format, it current outputs as 2019-02-22T20:23:52.011Z I tried adding the .toLocaleDateString to format this date but I keep getting the same error of More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reactgo
reactgo.com › home › how to solve tolocaledatestring is not a function in javascript
How to Solve toLocaleDateString is not a Function in JavaScript | Reactgo
September 13, 2023 - To solve the “TypeError: toLocaleDateString is not a function”, make sure to call the toLocaleDateString() method on a data type date object or convert the given value to a valid date object before calling the toLocaleDateString() method on it.
🌐
Reddit
reddit.com › r/googleappsscript › typeerror: this.time.tolocaletimestring is not a function
r/GoogleAppsScript on Reddit: TypeError: this.time.toLocaleTimeString is not a function
March 3, 2021 -

I borrowed someone's code from 2018 and am running into errors with this line:

this.timeString = this.time.toLocaleTimeString();

this.time is defined earlier. There seems to be an easy workaround, but I cannot find it.

Maybe I should resume work next week.

🌐
GitHub
github.com › Nexus-Mods › Vortex › issues › 15567
Bug Report - Other: TypeError: _a.toLocaleDateString is not a function · Issue #15567 · Nexus-Mods/Vortex
April 20, 2024 - Vortex Version: 1.11.0-beta Memory: 31.87 GB System: win32 x64 (10.0.22631) Component rendering error Vortex Version: 1.11.0-beta, TypeError: _a.toLocaleDateString is not a function at remainingBar (C:\Users\Paint\AppData\Roaming\Vortex\...
Author   VortexFeedback
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › toLocaleDateString
Date.prototype.toLocaleDateString() - JavaScript | MDN
The locales and options parameters may not be supported in all implementations, because support for the internationalization API is optional, and some systems may not have the necessary data. For implementations without internationalization support, toLocaleDateString() always uses the system's locale, which may not be what you want. Because any implementation that supports the locales and options parameters must support the Intl API, you can check the existence of the latter for support: ... function toLocaleDateStringSupportsLocales() { return ( typeof Intl === "object" && !!Intl && typeof Intl.DateTimeFormat === "function" ); }
🌐
Peterbe.com
peterbe.com › plog › be-careful-with-date.tolocaledatestring
Be careful with Date.toLocaleDateString() in JavaScript - Peterbe.com
May 8, 2023 - A better way is to force Date.toLocaleString to be fed a timezone. Now it's controlled at the highest level: export function formatDateBasic(date: string) { return new Date(date).toLocaleDateString("en-us", { year: "numeric", month: "long", day: "numeric", + timeZone: "UTC" }); }
Find elsewhere
🌐
ServiceNow Community
servicenow.com › community › developer-forum › tolocaledatestring-is-not-working-in-server-side-script › td-p › 1441723
Solved: toLocaleDateString is not working in server side s... - ServiceNow Community
March 28, 2022 - Solved: Hi We need to convert a date to Japanese calendar. On the client side, dt.toLocaleDateString('ja-JP-u-ca-japanese',{era: 'long'}) works and
🌐
W3Schools
w3schools.com › jsref › jsref_tolocaledatestring.asp
W3Schools.com
The toLocaleDateString() method returns the date (not the time) of a date object as a string, using locale conventions.
🌐
MSR
rajamsr.com › home › how to use tolocaledatestring() to create stunning date formats
How to Use toLocaleDateString() to Create Stunning Date Formats | MSR - Web Dev Simplified
March 4, 2024 - Use typeof and instanceof type-checking methods to avoid the "toLocaleDateString is not a function" error when using non-date types.
🌐
GitHub
github.com › backstage › backstage › issues › 18293
🐛 Bug Report: Tech radar plugin - data source issue - i.date.toLocaleDateString is not a function · Issue #18293 · backstage/backstage
April 5, 2023 - 🐛 Bug Report: Tech radar plugin - data source issue - i.date.toLocaleDateString is not a function#18293 · Copy link · Labels · type:bugSomething isn't workingSomething isn't working · thomasmebin · opened · on Jun 16, 2023 · Issue body actions ·
Author   thomasmebin
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-date-tolocaledatestring-method
JavaScript Date toLocaleDateString() Method - GeeksforGeeks
July 11, 2025 - The toLocaleDateString() method ... of locale strings that contain one or more language or locale tags. Note that it is an optional parameter....
🌐
Can I Use
caniuse.com
"toLocaleDateString" | Can I use... Support tables for ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
🌐
Wix Studio
forum.wixstudio.com › ask the community
Can't get .toLocaleDateString('en-GB') to work keeps it as US - Ask the community - Community Support Forum | Wix Studio
September 29, 2019 - I am using the following code to return a GB date and time format but it just won’t change it from a US format What am i doing wrong. const sd = new Date() const SysDate = sd.toLocaleDateString(‘en-GB’) const Sy…
🌐
freeCodeCamp
forum.freecodecamp.org › t › date-format-looks-different-on-brave-compared-to-edge-and-firefox › 620860
Date format looks different on brave compared to edge and firefox - The freeCodeCamp Forum
July 5, 2023 - I am working on a project where i need to format the date to get the data i need and the date is formatted as 05-July. Below is the code i have to format the date: function dateFormated() { return new Date() .toLocaleDateString("default", { day: "2-digit", month: "short" }) .replace(" ", "-"); } It shows incorrectly on brave July-05, but on Firefox and edge it shows the correct way i formatted 05-July.
🌐
Moment.js
momentjs.com › docs
Moment.js | Docs
For these reasons, we agree with MDN's statement that parsing strings with the Date object is strongly discouraged. Modern JavaScript environments will also implement the ECMA-402 specification, which provides the Intl object, and defines behavioral options of the Date object's toLocaleString, toLocaleDateString, and toLocaleTimeString functions. When using the Intl object, be aware of the following: Not every environment will implement the full specification.
🌐
TutorialsPoint
tutorialspoint.com › javascript › date_tolocaledatestring.htm
JavaScript Date toLocaleDateString() Method
This method returns only date (not time) of a date object as a string, using the locale conventions. In the following example, we are demonstrating the basic usage of JavaScript Date toLocaleDateString() method −
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › toLocaleTimeString
Date.prototype.toLocaleTimeString() - JavaScript | MDN
October 30, 2025 - The locales and options parameters may not be supported in all implementations, because support for the internationalization API is optional, and some systems may not have the necessary data. For implementations without internationalization support, toLocaleTimeString() always uses the system's locale, which may not be what you want. Because any implementation that supports the locales and options parameters must support the Intl API, you can check the existence of the latter for support: ... function toLocaleTimeStringSupportsLocales() { return ( typeof Intl === "object" && !!Intl && typeof Intl.DateTimeFormat === "function" ); }