-2

For Example, when I give it 01/01/2020 it should know that it's week 1 or 12/03/2020 it is week 13. All this in a Laravel app.

fubar
  • 15,852
  • 4
  • 34
  • 37

1 Answers1

0

If it implements DateTimeInterface You can use DateTime::format() method with 'W'. More info and usecases here.

enter image description here

kris016
  • 127
  • 2
  • 8