Fixed a year end bug when determining week number, the previous year's week is not being returned properly.