There are only seven days in a week. How can you use 8 and get an answer
that gives a result for Friday which is day number 6.
Friday - Thrusday = 1, Thursday + 1 = Friday
Eight - Thursday = 3, Thursday + 3 = Sunday
Eight - Friday = 4, Friday + 4 = 10 which will give the
wrong date for the end of week day.
The code should subtract the current day of the week from the end of the
week day. This gives the number of days left until the end of the week.
Then add that number to the current date to get the date for the end of week
day.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.