Soliman
Soliman

Reputation: 441

get week for 01-01-2011 using strftime returns 00

$w = strftime("%W",mktime(0,0,0,1,1,2011));    
echo $w;

returns "00"

Why?

Upvotes: 2

Views: 197

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799044

The first Monday of 2011 is the 3rd, therefore the 1st and 2nd are in week 0.

Upvotes: 5

Related Questions