New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solved issue-#4783 #4786
solved issue-#4783 #4786
Conversation
Travis failed on locale/ka.js - which was untouched by this PR. I notice some others PR had the same problem (#4762) Also, there seems to be a problem with job 4282.6 related to installing dependencies. Thanks |
@@ -504,6 +504,18 @@ test('when in strict mode with inexact parsing, treat periods in min-weekdays li | |||
assert.equal(moment('thurs', 'dd', true).format('dddd'), 'Thursday'); | |||
}); | |||
|
|||
test('when weekdays is passed \'true\' as argument, days have to be ordered based on locale first day of the week', function (assert) { | |||
var deLocaleData = moment(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/question: any reason we can't use const
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the rest of this library is written in ES5, but const
was a ES2015 addition:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const
var deLocaleData = moment(); | ||
deLocaleData.locale('de'); | ||
|
||
var neLocaleData = moment(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, can we use const
instead of var
?
Thanks for opening this request. I instead merged #4553 . |
Hi, I debug and solved the issue #4783. Now it is possible to do
var deLocaleData = moment();
deLocaleData.locale('de');
deLocaleData.localeData().weekdays(true) // --> ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag']
deLocaleData.localeData().weekdays() // --> ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag']
Hopes this helps out! Bye