In delphi DateToStr (Date) show You YEAR-MONTH-DAY of this day.
DateToStr (Date + 4000) show You 4000 days forward and
DateToStr (Date - 4000) show You 4000 days back.
If You want to do the same in MidletPascal must You join GetDay,GetMonth and GetYear but how.