cdm/src/main/java/ucar/nc2/units/DateUnit.java
public double makeValue(Date date) {
    double secs = date.getTime() / 1000.0;
    double origin_secs = getDateOrigin().getTime() / 1000.0;
    double diff = secs - origin_secs;

    try {
      timeUnit.setValueInSeconds(diff);
    } catch (Exception e) {
      throw new RuntimeException(e.getMessage());
    }
    return timeUnit.getValue();
  }
public double makeValue(Date date) {
    double secs = date.getTime() / 1000.0;
    double origin_secs = getDateOrigin().getTime() / 1000.0;
    double diff = secs - origin_secs;

    try {
      timeUnit.setValueInSeconds(diff);
    } catch (Exception e) {
      throw new RuntimeException(e.getMessage());
    }
    return timeUnit.getValue();
  }
Create the equivalent value from this base unit and the given Date.
Inverse of makeDate.

@param date to convert.
@return value in units of this base unit.