I getting really confused about how to use the Date function and all of the methods. I need to find the day of the week that November 1st falls for any year or just the current year. But I don’t know how to set the month to November and the day of the month to 1 and then use those values to get the day of the week for 11/1 for the current year.
I need to get the day of the week so that I can output the precincts in my township that have leaf pickup. Leaf pickup is over 6 weeks and there are 3 or 4 precincts per week. But each year takes the last 2 precincts from the year before and makes them the first two. I created that array using slice and push, but I want to output something like “Pickup for the week of November 1st…” and then “week of November 8th…”, etc.
I figured I would use switch for days 0 thru 6, but I either have to hard-code the date or I get the current date when I use new Date(). The leaf pickup is an 11-year cycle and then it repeats, and I also know that any date is on the same date every 7 years.
I think that I should get the current year, then grab the day of the week for 11/1 but Date() is confusing me. Any clues on how I should approach this?