Get Week no in year from date in PHP

you can get week number in the year from given date in PHP in this given method.
<?php
$ddate = "2012-10-18";
$date = new DateTime($ddate);
$week = $date->format("W");
echo "Weeknummer: $week";
?> 

No comments:

Post a Comment

Featured Post

Assignemtn solution for CS61 spring 2020

Assignment solution CS601 S. No. Question Answer 1 Which type of topology is used in ...