xxxxxxxxxx
// Golang get current year and week
tn := time.Now().UTC()
fmt.Println(tn)
year, week := tn.ISOWeek()
fmt.Println(year, week)
xxxxxxxxxx
<?php
$ddate = "2012-10-18";
$date = new DateTime($ddate);
$week = $date->format("W");
echo "Weeknummer: $week";