Calculating first day Date of a week from a given week number

89 Views Asked by At

I have a question and can't find that specific answer. In my application, my work year start on july 1 every years. So 52 weeks later, I start again on july first. What I want is a field that I enter let say week 32. I want to have the answer of what is the first day of that specified week and show it as date format. So in other words, if I put week 1 in the field, it will give me the result = July 1 and if I put Week 2 in the field, it will gives me july 8, etc. But I think that every year could change. So I need a calculation that will do this. Is it possible in php? Tks for help Seby

1

There are 1 best solutions below

2
On
strtotime("July 1 2013 +".$monthNum." months");

something like this?