I would like to get a list of date for every Monday in a year using Batch Script.
Sample input:
2018
Sample output:
2018-01-01
2018-01-08
2018-01-15
2018-01-22
2018-01-29
...
2018-12-03
2018-12-10
2018-12-17
2018-12-24
2018-12-31
I found the below post which return the date of last Sunday in every month: https://rosettacode.org/wiki/Find_the_last_Sunday_of_each_month#Batch_File
I tried to modified it, but it doesn't seem to work with my requirement.
I was also thinking of getting the first Monday date in a year and add 7 to that date with a loop until the end of the year. However, I am struggling to find an example to do so.
Any help is great appreciated.
Thanks,
Daniel