cdm/src/main/java/ucar/nc2/units/DateRange.java
public void setEnd(DateType end) {
    this.end = end;
    useEnd = true;

    if (useStart) {
      this.isMoving = this.start.isPresent() || this.end.isPresent();
      useDuration = false;
      recalcDuration();

    } else {
      this.isMoving = this.end.isPresent();
      this.start = this.end.subtract(duration);
    }
    checkIfEmpty();
  }
public void setEnd(DateType end) {
    this.end = end;
    useEnd = true;

    if (useStart) {
      this.isMoving = this.start.isPresent() || this.end.isPresent();
      useDuration = false;
      recalcDuration();

    } else {
      this.isMoving = this.end.isPresent();
      this.start = this.end.subtract(duration);
    }
    checkIfEmpty();
  }
public void setEnd ( DateType end ) { this . end = end ; useEnd = true ; if ( useStart ) { this . isMoving = this . start . isPresent ( ) || this . end . isPresent ( ) ; useDuration = false ; recalcDuration ( ) ; } else { this . isMoving = this . end . isPresent ( ) ; this . start = this . end . subtract ( duration ) ; } checkIfEmpty ( ) ; }
Set the ending Date. Makes useEnd true.
If useStart, recalculate the duration, else recalculate start.

@param end ending Date
Set the ending Date . Makes useEnd true . If useStart recalculate the duration else recalculate start .