1

I have a question. I want to get the first datetime by week number and year. It's possibile ? I try :

date('Y-m-d H:i:s', strtotime("$weak_number week")).

The idea is to get the datetime of monday for this week. Thx in advance, and sorry for my english

Harea Costicla
  • 797
  • 3
  • 9
  • 20

1 Answers1

1
    $date1 = date(
    'Y-m-d', 
    strtotime($year . 'W' . str_pad($week, 2, '0', STR_PAD_LEFT))
);
Jignesh Patel
  • 1,028
  • 6
  • 10