# toLocaleString functions not using the locale

**URL:** <https://community.fibery.io/t/tolocalestring-functions-not-using-the-locale/8118>\
**Category:** API & Programming\
**Created:** [January 14, 2025, 11:53am UTC](https://community.fibery.io/t/tolocalestring-functions-not-using-the-locale/8118 "2025-01-14T11:53:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomvb](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/tomvb/32/8764_2.png) [@tomvb](https://community.fibery.io/u/tomvb)\
**Post date:** [January 14, 2025, 11:53am UTC](https://community.fibery.io/t/tolocalestring-functions-not-using-the-locale/8118/1 "2025-01-14T11:53:02Z")

</div>

I’m using the email action to send an email to users. In it I’m trying to output the date and time in the `nl-NL` locale using `toLocaleDateString` and `toLocaleTimeString`.

Prototyping in the Chrome Developer Console, the following code works and gives me the Dutch formatted date and time. However, when using the email action, it seems to default to an English/American locale like this: “Wednesday, February 5, 2025 om 03:00 PM”

```auto
{!AfspraakDatum!}

<%
const afspraakdatum = new Date(Entity.AfspraakDatum);
const afspraakDag = afspraakdatum.toLocaleDateString('nl-NL', {timeZone: 'Europe/Amsterdam', weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric'});
const afspraakTijd = afspraakdatum.toLocaleTimeString('nl-NL', { timeZone: 'Europe/Amsterdam', hour: '2-digit', minute: '2-digit', hour12: false });
%>

<%= afspraakDag %> om <%= afspraakTijd %>

```

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![Viktar\_Zhuk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/viktar_zhuk/32/1934_2.png) [@Viktar\_Zhuk](https://community.fibery.io/u/Viktar_Zhuk)\
**Post date:** [January 15, 2025, 6:49am UTC](https://community.fibery.io/t/tolocalestring-functions-not-using-the-locale/8118/2 "2025-01-15T06:49:31Z")

</div>

> [@tomvb](#):
>
> ```auto
> nl-NL', { timeZone: 'Europe/Amsterdam', hour: '2-digit', minute: '2-digit', hour12: false });
> %>
> 
> ```

Hello, please adjust your expectations from our javascript library to subset of Nodejs v12.7

We are considering to update it to recent versions but this is not in our immediate plans.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 29, 2025, 11:31am UTC](https://community.fibery.io/t/tolocalestring-functions-not-using-the-locale/8118/3 "2025-04-29T11:31:24Z")

</div>


