to check for overflow because the legal range of type date is actually wider than timestamp's. Problem found by Neil Conway.