public static DurationUnit durationUnitFromValue(int value) {
    if (value == DurationUnit.DAY.value)
      return DAY;
    if (value == DurationUnit.MONTH.value)
      return MONTH;

    throw new IllegalArgumentException("不支持的日期单位数值");
  }