fixed bug where the date detection fails when the 1st is a thursday. Also fixed a wrong test
Merge branch 'master' into gh-pages