- ceil: documentation ( source)
- date: documentation ( source)
- max: documentation ( source)
- strtotime: documentation ( source)
<?php
echo $wk_baseline = date('w', strtotime('01/01/2016')) - 1 . "\n";
echo ceil(max(date('z', strtotime("1/18/2016")) + 1 + $wk_baseline,0) / 7) . "\n";
echo date('z', strtotime("1/18/2016"));
?>