Answer the question
In order to leave comments, you need to log in
How to get the day of the week when entering a date?
You need to create a function that, when you enter a date, will show what day of the week it was. Time period August 7 - September 8. The calendar is not ours. you have to generate it yourself.
I tried to do it through the generation of an associative array, but I run into the problem of how to avoid the program stupor when moving to the next month (September, for example), if the transition occurs in the middle of the week.
Answer the question
In order to leave comments, you need to log in
Why bother with associative arrays when ES6 has a standard methoddate.toLocaleString('ru', {weekday: 'long'})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question