Examples of TimeUnit


Examples of ucar.nc2.units.TimeUnit

      DateRange dateRange2 = gcs.getDateRange();
      if ((taxis != null) && ((dateRange == null) || !dateRange2.equals(dateRange))) {

        long ntimes = taxis.getSize();
        try {
          TimeUnit tUnit = taxis.getTimeResolution();
          dateRange = new DateRange(dateRange2, "1 hour");
          out.println("  DateRange == " + "start= " + dateRange.getStart() + " end= " + dateRange.getEnd() +
              " duration= " + dateRange.getDuration() + " ntimes = " + ntimes + " data resolution = " + tUnit);
        } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

Examples of ucar.nc2.units.TimeUnit

      String units = "Days ago";
      TimeDuration duration = dateRange.getDuration();
      double value = -0.0;

      try {
        TimeUnit tdayUnit = new TimeUnit("days");
        value = duration.getValue(tdayUnit);

      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of ucar.nc2.units.TimeUnit

    this.params.suffix = suffix;
    this.params.subdirs = subdirs != null && subdirs.equalsIgnoreCase("true");

    if (olderThanS != null) {
      try {
        TimeUnit tu = new TimeUnit(olderThanS);
        this.params.lastModifiedLimit  = (long) (1000 * tu.getValueInSeconds());
      } catch (Exception e) {
        logger.error("Invalid TimeUnit = "+olderThanS);
        throw new IllegalArgumentException("Invalid TimeUnit = "+olderThanS);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.