Minor fix in getdistanceindays to support +2050