Skip to content


Removed formatting dots from Dutch month/weekday abbreviations. #325

wants to merge 1 commit into from

3 participants


This allows for custom formats such as 'D-MMM-YYYY'. Current code gives f.e. '23-jun.-2012' while '23-jun-2012' is expected/preferred.

Moment.js member

@jjupiter, you submitted the original language, what's your input?

Moment.js member

@jjupiter seems to be afk for the past couple months. According to, the dots seem to be preferred in formatting tokens.

<monthContext type="format">
    <monthWidth type="abbreviated">
        <month type="1">jan.</month>
        <month type="2">feb.</month>
        <month type="3">mrt.</month>

It's a bit tricky indeed. If used in a sentence, the abbreviations containing dots are perfectly fine. It is only when combined with a non-space separator (as in my example) that the dots should be left out (imho). The JVM also outputs '23-jun-2012'. I understand that this breaks existing code using 'MMM'. If you are unwilling to change this, could you suggest a workaround? The only thing I can think of is using a custom language file, but this seems a bit overkill.

Moment.js member

We are thinking of adding callbacks for month and weekday names in #313 so you could do something like this in the lang config perhaps:

monthsShort : function function (momentToFormat, format) {
    if (/-MMM-/.test(format)) {
        return withDots[momentToFormat.month()];
    } else {
        return withoutDots[momentToFormat.month()];

That sounds like a plan, thanks. I'll open a pull request once available.

Moment.js member

Cool, you can check out the feature/add-month-name-callback and write code and tests against that.

@timrwood timrwood referenced this pull request

1.7.0 Changelog #288

Moment.js member

This has been merged into the develop branch, so you can write tests and code against that. Also, please change the pull request to be to the develop branch instead of the master branch. Thanks!


@timrwood, this has been merged then? Can we close this pull request?

Moment.js member

This has been merged into the develop branch, so you can write tests and code against that.

Sorry, I was referring to #313 being merged into develop (adding the month name and weekday name callbacks).

@cgbeekman, I'm closing this out, but when you have the code and tests written based on the comment above please submit a new pull request to the develop branch.

@timrwood timrwood closed this

I'm working on this, but fixed another issue first: #346
Unfortunately, I did not create the changes in a separate branch so I'm unable to file a pull request for them until #346 has been pulled.

Moment.js member

You can just add them to #346 if you want. They are both on the same lang file, so I think it's related enough. I think you should be able to change the range of the pull request, but if not, let me know and I'll merge in #346 so you can submit the other request.


Added my commits to #346, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lang/nl.js
4 lang/nl.js
@@ -1,9 +1,9 @@
(function () {
var lang = {
months : "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),
- monthsShort : "jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),
+ monthsShort : "jan_feb_mar_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),
weekdays : "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),
- weekdaysShort : "zo._ma._di._wo._do._vr._za.".split("_"),
+ weekdaysShort : "zo_ma_di_wo_do_vr_za".split("_"),
longDateFormat : {
LT : "HH:mm",
Something went wrong with that request. Please try again.