Question

In Bourne shell, I need to know which dates belong to the same week. For example, week 16 in 2013 starts on April 22nd and ends on April 28th. Using the "date" command I can get the week number for a certain date but I need to go the other way around.

Thanks

Was it helpful?

Solution

A cheap way to obtain week numbers - Use ncal, the week numbers are output below calendar

e.g.

ncal -w 4 2013

or

ncal -w 2013
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top