fix the insane limits of laterthan, max year 1000 makes it useless. Redmine #6530.

(cherry picked from commit 5262df056aba4db160cdafac0ce7a9a4b2387752)
Update changelog