I thought a lot - I tried but I could not solve it. I need a JavaScript application that shows the nearest weekend dates in the current date.
If it's a weekend now, give it the dates of this weekend, if not, then next weekend's dates.
I'm waiting for your help. Respects.
You can use the built-in
Date
constructor.To get the date, use
saturday.getDate()
orsunday.getDate()
.Remember thatDate
months are 0-based. See here for more info.