Day of next or previous year
Let's get a date object containing January
21st of next year. To do this, add
one to the current year:
javascriptlet now = new Date();
let date = new Date(now.getFullYear() + 1, 0, 21);
Задание 1
Determine what day of the week will be
December 31 of next year.
Задание 2
Determine what day of the week will be one year later on the same date as today.
Задание 3
Determine what day of the week was a year ago on the same date as today.