Is there a way to find the week number for a year using PHP?

Is there a way to find the week number for a year using PHP?

+3
source share
3 answers

You can do this using date, using a format string Wthat returns:

ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)

eg.

date("W");
+5
source
+2
source

I believe that the standard itself is called the GPS week number, see http://www.ngs.noaa.gov/CORS/Gpscal.html

The identifier of the current week is 1578.

0
source

Source: https://habr.com/ru/post/1739984/


All Articles