cdm/src/main/java/ucar/nc2/units/DateRange.java
private String chooseResolution(double time) {
    if (time < 180) // 3 minutes
      return "secs";
    time /= 60; // minutes
    if (time < 180) // 3 hours
      return "minutes";
    time /= 60; // hours
    if (time < 72) // 3 days
      return "hours";
    time /= 24; // days
    if (time < 90) // 3 months
      return "days";
    time /= 30; // months
    if (time < 36) // 3 years
      return "months";
    return "years";
  }
private String chooseResolution(double time) {
    if (time < 180) // 3 minutes
      return "secs";
    time /= 60; // minutes
    if (time < 180) // 3 hours
      return "minutes";
    time /= 60; // hours
    if (time < 72) // 3 days
      return "hours";
    time /= 24; // days
    if (time < 90) // 3 months
      return "days";
    time /= 30; // months
    if (time < 36) // 3 years
      return "months";
    return "years";
  }
private String chooseResolution ( double time ) { if ( time < 180 ) // 3 minutes return "secs" ; time /= 60 ; // minutes if ( time < 180 ) // 3 hours return "minutes" ; time /= 60 ; // hours if ( time < 72 ) // 3 days return "hours" ; time /= 24 ; // days if ( time < 90 ) // 3 months return "days" ; time /= 30 ; // months if ( time < 36 ) // 3 years return "months" ; return "years" ; }
choose a resolution based on # seconds
choose a resolution based on # seconds