DateMath: properly recognize and handle weeks.

Fixes #628.

cc: @mintsoft