How can I use the date command to convert something like "monday week 40" into a ISO date?
I am playing with something like this:
date --date='monday week 40' +'%Y-%m-%d'
And the date I'm searching for would be 2011-10-03.
But my problem is that this date string is not valid, so I need another approach to solve this problem.
/Thanks
Best Answer
Really ugly and probably works only with GNU
date
:Tested only for your 3 October example, may fail for some other cases.
Update: If you have a non eng locale you need to specify the output from the inner date to get to to work. (And %F just is YYYY-MM-DD).