Tuesday, 6 December 2016

Generate Date from week, day number and year.

Generate Date from week, day number and year.
//


PHP has a function named 'setISODate'.  This function takes year, week number and day as parameter and returns a date.
<?php
$date = new DateTime();
$date->setISODate(2011,48,4); //year , week num , day
echo $date->format('d-m-Y'); //"prints" date here
//

 

 
To read More about from here posted by Maz


Previous Post
Next Post

About Author

0 comments: