code: public I toCanonical() {
  
          boolean change = false;
          Boundary<T> s = this.start;
          Boundary<T> e = this.end;
  
          if (!this.start.isInfinite() && this.start.isOpen()) {
              T t = this.getTimeLine().stepForward(this.start.getTemporal());
  
              if (t == null) {
                  throw new IllegalStateException("Cannot canonicalize this interval: " + this);
              }
  
              s = Boundary.ofClosed(t);
              change = true;
          }
  
          if (!this.end.isInfinite()) {
              if (this.getFactory().isCalendrical()) {
                  if (this.end.isOpen()) {
                      T t = this.getTimeLine().stepBackwards(this.end.getTemporal());
  
                      if (t == null) {
                          throw new IllegalStateException("Cannot canonicalize this interval: " + this);
                      }
  
                      e = Boundary.ofClosed(t);
                      change = true;
                  }
              } else {
                  if (this.end.isClosed()) {
                      T t = this.getTimeLine().stepForward(this.end.getTemporal());
  
                      if (t == null) {
                          throw new IllegalStateException("Cannot canonicalize this interval: " + this);
                      }
  
                      e = Boundary.ofOpen(t);
                      change = true;
                  }
              }
          }
  
          return (change ? this.getFactory().between(s, e) : this.getContext());
  
      }
docs: /*[deutsch]
  <p>Wandelt dieses Intervall so um, da&szlig; kalendarische Intervalle geschlossen und andere
  Intervalle halb-offen werden. </p>
  
  <p>Der temporale Zeitraum wird nicht ge&auml;ndert. Unendliche Intervallgrenzen bleiben
  ebenfalls unver&auml;ndert. </p>
  
  @return  new interval with canonical boundaries
  @throws  IllegalStateException if there is no canonical form (for example for [00:00/24:00])
  @since   3.9/4.6