cdm/src/main/java/ucar/nc2/units/SimpleUnit.java
static public SimpleUnit factoryWithExceptions(String name) throws UnitException {
    UnitFormat format = UnitFormatManager.instance();
    Unit uu = format.parse(name);
    //if (isDateUnit(uu)) return new DateUnit(name);
    if (isTimeUnit(uu)) return new TimeUnit(name);
    return new SimpleUnit(uu);
  }
static public SimpleUnit factoryWithExceptions(String name) throws UnitException {
    UnitFormat format = UnitFormatManager.instance();
    Unit uu = format.parse(name);
    //if (isDateUnit(uu)) return new DateUnit(name);
    if (isTimeUnit(uu)) return new TimeUnit(name);
    return new SimpleUnit(uu);
  }
Create a SimpleUnit from the given name, allow Exceptions.

@param name parse this name to create a unit.
@return SimpleUnit, DateUnit, or TimeUnit
@throws Exception when date parser fails
@see ucar.units.UnitFormat#parse