fixed getweekday() so it returns the correct day.