Skip to content
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

Closed

Conversation

mbisurgi-designfreed
Copy link

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

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 94.725% when pulling ec19f6c on mbisurgi-designfreed:issue-#4783 into 2e2a5b3 on moment:develop.

@mbisurgi-designfreed
Copy link
Author

mbisurgi-designfreed commented Sep 24, 2018

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();

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?

Copy link
Member

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();

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?

@marwahaha
Copy link
Member

Thanks for opening this request.
For now, we will not take this change.

I instead merged #4553 .

@marwahaha marwahaha closed this Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants