Thursday, 2 August 2018

Error toLocaleDateString stays in English

HiThis may be a stupid question but I can't find a solution.I'm creating a chatbot and I want to return a date to LocaleDateString in Dutch. But it doesn't work.For example:Expectationvar event = new Date(Date.UTC(2018, 8, 2, 0, 0, 0));var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };console.log(event.toLocaleDateString('nl-NL', options));> "zondag 2 september 2018"Reality> "2018 M08 2, Thu"Do I need to install a package? If so can you give me a link.Thanks in advanced

Submitted August 02, 2018 at 11:18AM by TakaHo

No comments:

Post a Comment