code: public Date getTo() {
          Long to = null;
          for (final TimeInterval interval : intervals) {
              if (to == null) {
                  to = interval.getTo();
              } else {
                  to = Math.max(interval.getTo(), to);
              }
          }
          if (to != null) {
              return new Date(to);
          }
          return null;
      }
docs: Gets the last date in this timeline
  
  @return