Refactor jday and days2mdhms

Remove mutability from jday and days2mdhms