code: function addDurationToIso8601(dateIso8601, durationString) {
    if (!defined(dateIso8601) || dateIso8601.length < 3) {
      throw new DeveloperError("Bad date " + dateIso8601);
    }
    var duration = parseFloat(durationString);
    if (isNaN(duration) || duration === 0) {
      throw new DeveloperError("Bad duration " + durationString);
    }
    var julianDate = JulianDate.fromIso8601(dateIso8601, scratchJulianDate);
    var units = durationString.slice(durationString.length - 1);
    if (units === "s") {
      julianDate = JulianDate.addSeconds(julianDate, duration, scratchJulianDate);
    } else if (units === "h") {
      julianDate = JulianDate.addHours(julianDate, duration, scratchJulianDate);
    } else if (units === "d") {
      // Use addHours on 24 * numdays - on my casual reading of addDays, it needs an integer.
      julianDate = JulianDate.addHours(
        julianDate,
        duration * 24,
        scratchJulianDate
      );
    } else if (units === "y") {
      var days = Math.round(duration * 365);
      julianDate = JulianDate.addDays(julianDate, days, scratchJulianDate);
    } else {
      throw new DeveloperError(
        'Unknown duration type "' + durationString + '" (use s, h, d or y)'
      );
    }
    return JulianDate.toIso8601(julianDate);
  }
docs: Adds a period to an iso8601-formatted date.
  Periods must be (positive or negative) numbers followed by a letter:
  s (seconds), h (hours), d (days), y (years).
  To avoid confusion between minutes and months, do not use m.
  @param  {String} dateIso8601 The date in ISO8601 format.
  @param  {String} durationString The duration string, in the format described.
  @return {String} A date string in ISO8601 format.
  @private