As the headline says, PHP\'s date(\"W\") function gives back the calendar week (for the current day). Unfortunatly it gives back 52 or 53 for the first day(s) of most years.
$d = new DateTime('first monday january '.date('Y')); echo $d->format("W");