0

Is there a way to calculate start and end date in YYYY-MM-DD format given a year and a week number?

For example, week 3 of 2019 goes from 2019-01-14 to 2019-01-20.

I've thought about using mktime and then adding +7 days, but it has no week parameter.

I'm using PHP 5.6

Chef Tony
  • 435
  • 7
  • 14
  • 1
    Does this answer your question? [How to convert week number and year into unix timestamp?](https://stackoverflow.com/questions/5763340/how-to-convert-week-number-and-year-into-unix-timestamp) – Jeto Jan 02 '20 at 19:44
  • Yes, this works fine: `date("Y-m-d", strtotime("2019W03 +7 days"))`. Thanks! – Chef Tony Jan 02 '20 at 19:48

0 Answers0