# Localization Formatting Error in the %{date} function

**URL:** https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283
**Category:** Translations
**Created:** [September 29, 2025, 3:51pm UTC](https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283 "2025-09-29T15:51:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![inquisitorOzzak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/inquisitorozzak/32/511422_2.png) [@inquisitorOzzak](https://meta.discourse.org/u/inquisitorOzzak)
#### Post date: [September 29, 2025, 3:51pm UTC](https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283/1 "2025-09-29T15:51:41Z")

</div>

Hello guys,

I’m working on a Croatian language Localization for a small tech forum.  
And I found an error in the formatting of the %{date} function.

Here’s the print screen:

 ![Screenshot from 2025-09-29 17-30-10](https://global.discourse-cdn.com/meta/original/4X/d/d/d/ddd231bbf5a3f02c7c664c290ebb2d26da37d7bd.png)

as you can see the year is displayed as “252025”.  
it looks to me like:

- %e %b., **`%y%Y`** %H:%M

where it should be:

- %e %b., **`%Y`** %H:%M

ie. the year is inserted twice

The error shown above is on these js localization variables:

- `js.topic.created_at`

- `js.topic.bumped_at`

sooo…  
Is there a way to fix this on my side (control panel or server side)?  
Or is it a deeper problem in the source code?  
Any advice is appreciated.

Thanks in advance. 🙂  
Regards,  
Ozzak

ps.  
And let me know if you need any more info on the problem.

---

<div class="post-metadata">

### Author: ![inquisitorOzzak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/inquisitorozzak/32/511422_2.png) [@inquisitorOzzak](https://meta.discourse.org/u/inquisitorOzzak)
#### Post date: [September 29, 2025, 3:53pm UTC](https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283/2 "2025-09-29T15:53:43Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/7/5/8/7581dbd3b2fd7f25ecbc43da81ea42039917e23c.png)

another useful print screen

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [September 29, 2025, 4:07pm UTC](https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283/3 "2025-09-29T16:07:24Z")

</div>

Welcome to Meta 👋

> [@inquisitorOzzak](#):
>
> Is there a way to fix this on my side (control panel or server side)?

I think the text that doesn’t work as expected is `js.dates.long_with_year`. While the English version is `MMM D, YYYY h:mm a`, the Croatian version is `D MMM, YYY h:mm`, so there is one Y missing. You should be able to customize that on your site like [any other text](https://meta.discourse.org/t/customize-text-in-discourse/36092).

If that fixes the problem, it would be great if you could also improve this text for all forums where users use the Discourse interface in Croatian by improving the [translation on Crowdin](https://meta.discourse.org/t/contributing-translations-to-discourse/14882). (If you struggle with the interface of Crowdin, I’m happy to help. Alternatively, I can suggest the change if you tell me what it should be. You can learn more about the date formats of moment.js [here](https://momentjs.com/docs/#/displaying/format/))

Thank you for improving the translation of Discourse!

---

<div class="post-metadata">

### Author: ![inquisitorOzzak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/inquisitorozzak/32/511422_2.png) [@inquisitorOzzak](https://meta.discourse.org/u/inquisitorOzzak)
#### Post date: [September 30, 2025, 6:22am UTC](https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283/4 "2025-09-30T06:22:46Z")

</div>

yep… you are 100% correct.  
that was the exact problem.  
and I implemented your fix.  
quick and easy.

thank you very much 🙂

ps.  
and yeah…  
another member of my team is working on Crowdin Croatian translations for the past few months.  
I’ll tell her to include this as well.

---

<div class="post-metadata">

### Author: ![inquisitorOzzak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/inquisitorozzak/32/511422_2.png) [@inquisitorOzzak](https://meta.discourse.org/u/inquisitorOzzak)
#### Post date: [September 30, 2025, 6:33am UTC](https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283/5 "2025-09-30T06:33:08Z")

</div>

also…  
**[@mods](https://meta.discourse.org/groups/mods) -** I guess you can move this from “Bug” to “Support” category.  
and mark it as “Solved”

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 30, 2025, 6:34am UTC](https://meta.discourse.org/t/localization-formatting-error-in-the-date-function/384283/6 "2025-10-30T06:34:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
