Fixed bug #65199 (Wrong Day of Week) and fixed bug #63391 (Incorrect/inconsistent day of week prior to the year 1600)
Merge branch 'PHP-5.4' into PHP-5.5
Merge branch 'PHP-5.5' into PHP-5.6