{"action":"created","issue":{"url":"https://api.github.com/repos/moment/moment/issues/3043","repository_url":"https://api.github.com/repos/moment/moment","labels_url":"https://api.github.com/repos/moment/moment/issues/3043/labels{/name}","comments_url":"https://api.github.com/repos/moment/moment/issues/3043/comments","events_url":"https://api.github.com/repos/moment/moment/issues/3043/events","html_url":"https://github.com/moment/moment/issues/3043","id":141092221,"number":3043,"title":"deprivation warning when setting locale options","user":{"login":"streets-ahead","id":285691,"avatar_url":"https://avatars.githubusercontent.com/u/285691?v=3","gravatar_id":"","url":"https://api.github.com/users/streets-ahead","html_url":"https://github.com/streets-ahead","followers_url":"https://api.github.com/users/streets-ahead/followers","following_url":"https://api.github.com/users/streets-ahead/following{/other_user}","gists_url":"https://api.github.com/users/streets-ahead/gists{/gist_id}","starred_url":"https://api.github.com/users/streets-ahead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/streets-ahead/subscriptions","organizations_url":"https://api.github.com/users/streets-ahead/orgs","repos_url":"https://api.github.com/users/streets-ahead/repos","events_url":"https://api.github.com/users/streets-ahead/events{/privacy}","received_events_url":"https://api.github.com/users/streets-ahead/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/moment/moment/labels/Documentation","name":"Documentation","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-15T20:42:12Z","updated_at":"2016-03-16T01:11:04Z","closed_at":"2016-03-16T01:11:04Z","body":"I'm including moment as follows:\r\n\r\n```\r\nvar moment = require('moment');\r\nmoment.locale('en', {\r\n\tweek: {\r\n\t\tdow: 1 // Monday is the first day of the week.\r\n\t}\r\n});\r\n```\r\n\r\nAs soon as I run this code in Node I get:\r\n\r\n```\r\nDeprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale\r\n```\r\n\r\nI'm using node, but you can also see here: https://jsfiddle.net/6gtctkhj/\r\n\r\nIt could be that I'm setting the configuration incorrectly, but it seems correct according to [http://momentjs.com/docs/#/customization/](http://momentjs.com/docs/#/customization/).  It looks like the problem might be in the following method:\r\n\r\n```\r\nfunction locale_locales__getSetGlobalLocale (key, values) {\r\n        var data;\r\n        if (key) {\r\n            if (isUndefined(values)) {\r\n                data = locale_locales__getLocale(key);\r\n            }\r\n            else {\r\n                data = defineLocale(key, values);\r\n            }\r\n\r\n          ...\r\n        }\r\n\r\n        return globalLocale._abbr;\r\n    }\r\n```\r\n\r\nThis method calls defineLocale, but may need to be updated to call updateLocale?"},"comment":{"url":"https://api.github.com/repos/moment/moment/issues/comments/197093619","html_url":"https://github.com/moment/moment/issues/3043#issuecomment-197093619","issue_url":"https://api.github.com/repos/moment/moment/issues/3043","id":197093619,"user":{"login":"maggiepint","id":6054610,"avatar_url":"https://avatars.githubusercontent.com/u/6054610?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiepint","html_url":"https://github.com/maggiepint","followers_url":"https://api.github.com/users/maggiepint/followers","following_url":"https://api.github.com/users/maggiepint/following{/other_user}","gists_url":"https://api.github.com/users/maggiepint/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiepint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiepint/subscriptions","organizations_url":"https://api.github.com/users/maggiepint/orgs","repos_url":"https://api.github.com/users/maggiepint/repos","events_url":"https://api.github.com/users/maggiepint/events{/privacy}","received_events_url":"https://api.github.com/users/maggiepint/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T01:11:04Z","updated_at":"2016-03-16T01:11:04Z","body":"Docs updated in moment/momentjs.com#277"}}