I did not fully test this for every scenario and leap years. But it worked for what I was using it for. If anyone has any bugs with it, let me know.
function currWeek()
{
$dateArray = getdate();
$yday = $dateArray['yday'];
$wday = $dateArray['wday'];
$cMon = $yday – $wday;
$currWk = ceil($cMon/7);
return $currWk;
}
UPDATE!! A plugin is now available for this tutorial that includes more features read more...
When running a site with a boat load of javascript, you may want to run a script read more...
Download Plugin THEMES: theme-lighttheme-dark<link href="{{ path to js read more...
Greetings All! Since everyone was digging the Star Comment Rating I decided that read more...
How often do you work with tables? I work with them quite a bit and styling t read more...
date(‘W’);First day of the week is Monday.