Reimplemented the week function for DateTime for 100x speedup.