D
D
Dmitry Doveloper2018-02-08 08:16:35
JavaScript
Dmitry Doveloper, 2018-02-08 08:16:35

How to get the day of the week in accusative in momentjs?

momentjs has the names of the days of the week in the nominative and accusative cases. How can I get a name in the accusative case?
I usually get this:

moment.weekdays(2);
moment(str).format("dddd");

Source:
moment.updateLocale('en', {
    weekdays : {
        standalone: 'Воскресенье_Понедельник_Вторник_Среда_Четверг_Пятница_Суббота'.split('_'),
        format: 'Воскресенье_Понедельник_Вторник_Среду_Четверг_Пятницу_Субботу'.split('_'),
        isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
    }
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Kotosin, 2018-02-09
@av_kotosin

Have you read the documentation? It's not clear what the question is...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question