Given a week number, e.g. date -u +%W
, how do you calculate the days in that week starting from Monday?
Example rfc-3339 output for week 40:
2008-10-06
2008-10-07
2008-10-08
2008-10-09
2008-10-10
2008-10-11
2008-10-12
Given a week number, e.g. date -u +%W
, how do you calculate the days in that week starting from Monday?
Example rfc-3339 output for week 40:
2008-10-06
2008-10-07
2008-10-08
2008-10-09
2008-10-10
2008-10-11
2008-10-12
For those looking for the days of the week given the week number (1-52) Starting from a sunday then here is my little work around. Takes into account checking the week is in the right range and pads the values 1-9 to keep it all working.