Hi friends i need to get the week count .
for ex 1,2,3 .... 52 based on the current year .
In php week starts from Monday or Sunday by default
Is there anyway to set 'Tuesday' has default starting day .
my code is ...
echo "current week of 2012 this year is ..". $weekNumber = date("W");
output for exapmle 16 . whereas correct should be 15 .
because i need the week starting from tuesday not monday , can anyone tell me how to do it .
since there is very less documentation on it will help others in future if answer is found :)
your help and time will be appreciated . or please suggest me a way in comments then :)
I got my solution thanks to an answer from ramesh.
To change Tuesday as the start of the week, I did it by using:
echo "Week count : ".date("W", strtotime("- 1 day"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With