Search code examples
phpdatetimedateweek-numberdatetime-generation

How Can I get days of an specific Week in PHP?


Possible Duplicate:
Calculating days of week given a week number

In PHP you can get the number of week with 'date('W');' and it will return ISO-8601 week number of year

Now how I can get the days of an specific week and the month(s) ?

Update: For example I know 'Monday the 12th week of 2011' and want to get '31st March'


Solution

  • For days in a month you can use cal_days_in_month and for days in a specified week you can check out the following question: Calculating days of week given a week number