tdcommon/src/main/java/thredds/server/catalog/writer/ThreddsMetadataExtractor.java
public CalendarDateRange extractCalendarDateRange(GridDataset gridDataset) {
    CalendarDateRange maxDateRange = null;

    for (GridDataset.Gridset gridset : gridDataset.getGridsets()) {
      GridCoordSystem gsys = gridset.getGeoCoordSystem();
      CalendarDateRange dateRange;

      CoordinateAxis1DTime time1D = gsys.getTimeAxis1D();
      if (time1D != null) {
        dateRange = time1D.getCalendarDateRange();
      } else {
        CoordinateAxis time = gsys.getTimeAxis();
        if (time == null)
          continue;

        try {
          CalendarDateUnit du = CalendarDateUnit.of(null, time.getUnitsString()); // LOOK no calendar
          CalendarDate minDate = du.makeCalendarDate(time.getMinValue());
          CalendarDate maxDate = du.makeCalendarDate(time.getMaxValue());
          dateRange = CalendarDateRange.of(minDate, maxDate);
        } catch (Exception e) {
          logger.warn("Illegal Date Unit " + time.getUnitsString());
          continue;
        }
      }

      if (maxDateRange == null)
        maxDateRange = dateRange;
      else
        maxDateRange = maxDateRange.extend(dateRange);
    }

    return maxDateRange;
  }
public CalendarDateRange extractCalendarDateRange(GridDataset gridDataset) {
    CalendarDateRange maxDateRange = null;

    for (GridDataset.Gridset gridset : gridDataset.getGridsets()) {
      GridCoordSystem gsys = gridset.getGeoCoordSystem();
      CalendarDateRange dateRange;

      CoordinateAxis1DTime time1D = gsys.getTimeAxis1D();
      if (time1D != null) {
        dateRange = time1D.getCalendarDateRange();
      } else {
        CoordinateAxis time = gsys.getTimeAxis();
        if (time == null)
          continue;

        try {
          CalendarDateUnit du = CalendarDateUnit.of(null, time.getUnitsString()); // LOOK no calendar
          CalendarDate minDate = du.makeCalendarDate(time.getMinValue());
          CalendarDate maxDate = du.makeCalendarDate(time.getMaxValue());
          dateRange = CalendarDateRange.of(minDate, maxDate);
        } catch (Exception e) {
          logger.warn("Illegal Date Unit " + time.getUnitsString());
          continue;
        }
      }

      if (maxDateRange == null)
        maxDateRange = dateRange;
      else
        maxDateRange = maxDateRange.extend(dateRange);
    }

    return maxDateRange;
  }
//////////////////