Kirzilla
Kirzilla

Reputation: 16596

Is there a way to find the weeknumber within the year using PHP?

Is there a way to find the weeknumber within the year using PHP?

Upvotes: 3

Views: 153

Answers (3)

Steve
Steve

Reputation: 3649

Try date('W'); http://my2.php.net/manual/en/function.date.php

Upvotes: 2

Dominic Rodger
Dominic Rodger

Reputation: 99761

You can do this using date, using the W format string, which returns:

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

e.g.

date("W");

Upvotes: 5

Pavel Radzivilovsky
Pavel Radzivilovsky

Reputation: 19114

I believe the most standard is called GPS Week Number, see http://www.ngs.noaa.gov/CORS/Gpscal.html

Current week ID is 1578.

Upvotes: 0

Related Questions