function calculateRetainUntilDate(retention) {
    const { days, years } = retention;

    if (!days && !years) {
        return undefined;
    }

    const date = moment();
    // Calculate the number of days to retain the lock on the object
    const retainUntilDays = days || years * 365;
    const retainUntilDaysInMs = retainUntilDays * scaledMsPerDay;
    const retainUntilDate
        = date.add(retainUntilDaysInMs, 'ms');
    return retainUntilDate.toISOString();
}
Calculates retain until date for the locked object version
@param {object} retention - includes days or years retention period
@return {object} the date until the object version remains locked