Replaced hard coded weekday by old style calculation.