Answer the question
In order to leave comments, you need to log in
How to correctly display the correct date?
I'm trying to display Sunday by date
For example,
September 16 September
23 September
30
It turns out that if September 16 has come, the date should change to September 23, etc.
Now the countdown is from today plus 7 days
My code is Fiddle
Tell me how to write the condition correctly?
Answer the question
In order to leave comments, you need to log in
https://jsfiddle.net/jkg2wnh4/17/
date.setDate(date.getDate() + (7 - date.getDay()));
Just like before. Hold LMB on the button for changing the position and select the desired mode. Chrome 42 under Windows.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question