date('w', strtotime("2014-12-14")) returns 0
date('W', strtotime("2014-12-14")) returns 50
date('w', strtotime("2014-12-15")) returns 1
date('W', strtotime("2014-12-15")) returns 51
If 2014-12-14 is day 0 of the week (the first day), then surely it should also be the same week as 2014-12-15
Also I use cron to mysqldump the database and pipe it to /path_to_file/db_backup-`date +\%Y`-week-`date +\%W`.sql.gz
The week number that is produced by this on 2014-12-14 is 49.
I dont understand why I get three different week numbers for what should be the same week. Can anyone clarify?
Thanks