{"action":"created","issue":{"url":"https://api.github.com/repos/Baremetrics/calendar/issues/32","repository_url":"https://api.github.com/repos/Baremetrics/calendar","labels_url":"https://api.github.com/repos/Baremetrics/calendar/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/Baremetrics/calendar/issues/32/comments","events_url":"https://api.github.com/repos/Baremetrics/calendar/issues/32/events","html_url":"https://github.com/Baremetrics/calendar/issues/32","id":105032261,"number":32,"title":"Locale/option based first day of the week","user":{"login":"enekochan","id":1836845,"avatar_url":"https://avatars.githubusercontent.com/u/1836845?v=3","gravatar_id":"","url":"https://api.github.com/users/enekochan","html_url":"https://github.com/enekochan","followers_url":"https://api.github.com/users/enekochan/followers","following_url":"https://api.github.com/users/enekochan/following{/other_user}","gists_url":"https://api.github.com/users/enekochan/gists{/gist_id}","starred_url":"https://api.github.com/users/enekochan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enekochan/subscriptions","organizations_url":"https://api.github.com/users/enekochan/orgs","repos_url":"https://api.github.com/users/enekochan/repos","events_url":"https://api.github.com/users/enekochan/events{/privacy}","received_events_url":"https://api.github.com/users/enekochan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Baremetrics/calendar/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-05T15:23:03Z","updated_at":"2016-03-07T23:28:51Z","closed_at":"2016-03-07T23:28:51Z","body":"Right now the first day of the week is set to Sunday as it is used in en_US. But lots of languages, spanish for example, use other day, usually Monday, as first day of the week. We already have text and dates translations/localization which is great but this new feature I think should be a must.\r\n\r\nI've tried myself coding this feature but failed. The only thing I've managed to change is the order of the days array (S, M, T, ...) based on `moment().localeData().firstDayOfWeek()` replacing this code in `Calendar.prototype.calendarHTML`:\r\n\r\n    $.each(this.days_array || moment.weekdaysMin(), function(i, elem) {\r\n      ul_days_of_the_week.append('<li class=\"dr-day-of-week\">' + elem + '</li>'); \r\n    });\r\n\r\nWith this code:\r\n\r\n    var days = this.days_array || moment.weekdaysMin();\r\n    days = days.splice(moment().localeData().firstDayOfWeek()).concat(days.splice(0, moment().localeData().firstDayOfWeek()));\r\n    $.each(days, function(i, elem) {\r\n      ul_days_of_the_week.append('<li class=\"dr-day-of-week\">' + elem + '</li>'); \r\n    });"},"comment":{"url":"https://api.github.com/repos/Baremetrics/calendar/issues/comments/193504339","html_url":"https://github.com/Baremetrics/calendar/issues/32#issuecomment-193504339","issue_url":"https://api.github.com/repos/Baremetrics/calendar/issues/32","id":193504339,"user":{"login":"tyvdh","id":4383610,"avatar_url":"https://avatars.githubusercontent.com/u/4383610?v=3","gravatar_id":"","url":"https://api.github.com/users/tyvdh","html_url":"https://github.com/tyvdh","followers_url":"https://api.github.com/users/tyvdh/followers","following_url":"https://api.github.com/users/tyvdh/following{/other_user}","gists_url":"https://api.github.com/users/tyvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/tyvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyvdh/subscriptions","organizations_url":"https://api.github.com/users/tyvdh/orgs","repos_url":"https://api.github.com/users/tyvdh/repos","events_url":"https://api.github.com/users/tyvdh/events{/privacy}","received_events_url":"https://api.github.com/users/tyvdh/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T23:28:50Z","updated_at":"2016-03-07T23:28:50Z","body":"Added in https://github.com/Baremetrics/calendar/releases/tag/v1.0.6"}}