{"action":"opened","issue":{"url":"https://api.github.com/repos/moment/moment/issues/3286","repository_url":"https://api.github.com/repos/moment/moment","labels_url":"https://api.github.com/repos/moment/moment/issues/3286/labels{/name}","comments_url":"https://api.github.com/repos/moment/moment/issues/3286/comments","events_url":"https://api.github.com/repos/moment/moment/issues/3286/events","html_url":"https://github.com/moment/moment/issues/3286","id":163873839,"number":3286,"title":"Locale not able to load.","user":{"login":"trichner","id":4774528,"avatar_url":"https://avatars.githubusercontent.com/u/4774528?v=3","gravatar_id":"","url":"https://api.github.com/users/trichner","html_url":"https://github.com/trichner","followers_url":"https://api.github.com/users/trichner/followers","following_url":"https://api.github.com/users/trichner/following{/other_user}","gists_url":"https://api.github.com/users/trichner/gists{/gist_id}","starred_url":"https://api.github.com/users/trichner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trichner/subscriptions","organizations_url":"https://api.github.com/users/trichner/orgs","repos_url":"https://api.github.com/users/trichner/repos","events_url":"https://api.github.com/users/trichner/events{/privacy}","received_events_url":"https://api.github.com/users/trichner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-05T15:07:08Z","updated_at":"2016-07-05T15:07:08Z","closed_at":null,"body":"Hi, I'm getting a weird error from moment.js during `moment(..).format('dd DD. MMM YYYY')`.\r\nSometimes it seems to work fine but in other cases it throws a `TypeError` (see below).\r\n\r\nI tried to track down the underlying problem with no success, as far as I can see it's related to locales. Hence I used the `with-locales` version (previously I included only the necessary locales).\r\n\r\nI am using the latest (`2.14.1`) `min/moment-with-locales.js` from bower. Older versions such as `2.11` also didn't work properly.\r\n\r\n```\r\nangular.js:13708 TypeError: this.localeData(...).weekdaysMin is not a function\r\n    at Moment.<anonymous> (moment-with-locales.js:1230)\r\n    at Object.dd DD. MMM YYYY (moment-with-locales.js:612)\r\n    at formatMoment (moment-with-locales.js:627)\r\n    at Moment.moment_format__format [as format] (moment-with-locales.js:3057)\r\n```\r\n\r\nWhich is thrown here:\r\n```\r\naddFormatToken('dd', 0, 0, function (format) {\r\n        return this.localeData().weekdaysMin(this, format); // <--- TypeError\r\n});\r\n```\r\nDue to `this._locale._weekdaysMin = [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]` being an array.\r\n\r\nIs there anything I missed? Or could it be a library bug?"}}
{"actor":{"display_login":"trichner"}}