Jump to content

Date - Get day of week #X


w1ww

Recommended Posts

find thursday of first week, add 26*7 days

<?php
$wkNo = 27;
$offset = ($wkNo - 1)*7;
$date = mktime(0,0,0,1,1);
$firstThu = strtotime('next thursday', $date);
$thursOfWk = strtotime("+$offset days", $firstThu);

echo date ('d-M-Y', $thursOfWk);         // --> 03-Jul-2008
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.