code: function toEpoch(val, def) {
      return toDefault((is_1.isDate(val) && val.getTime()), def);
  }
docs: To Epoch
  Converts a Date type to an epoch.
  
  @param val the date value to convert.
  @param def optional default value when null.