Get week number from date
I'll start by saying that I hate working with date and time in PHP.
Anyway, my problem is probably very simple.
I need to get the week number from a date.
Date format is YY-MM-DD (Not from a MySQL database).
Let's say it's $date = '2005-05-02';
I assume I can just use date("W",$date), but the problem is that $date need to be converted into a UNIX timestamp first, if I'm not mistaken.
How do I do that? I've tried using strtotime(), strptime(), mktime(), etc., but with no success.
As I said, probably a simple problem :/