Fixed: Date at end of a year trips an assert

When a date was near the end of a year before 1970, an assert would
trip because the day would be out of range of 0 to 30 (0 based day
within the month).

The day would be off because the time was being calculated after the
year was calculated from the day.  Moving this calculation forward
solved the problem.

Added a test to guard against regression.