将指定日期加上指定的时长

@param dateUnit 单位
@param amount   时长
@param date     指定的日期
@return 增加指定时长后的日期
764971
public static Date add(DateUnit dateUnit, int amount, Date date) {
        return Date.from(date.toInstant().plus(amount, create(dateUnit)));
    }
1280666
public static Date parseTimestamp(String date) {
		try {
			return hasText(date) ? timestampParser.parse(date) : null;
		} catch (ParseException e) {
			logger.log(Level.WARNING, "parseTimestamp - ParseException caught.", e);
		}

		return null;
	}
1290904
public static <D extends Comparable> DateExpression<D> dateadd(DatePart unit, DateExpression<D> date, int amount) {
        return Expressions.dateOperation(date.getType(), DATE_ADD_OPS.get(unit), date, ConstantImpl.create(amount));
    }
77299
protected static DateWriter date(Date date) {
		return date((date == null) ? null : new ICalDate(date));
	}
270616
public static Date addMinute(String date, int amount) throws ParseException {
        return add(date, Calendar.MINUTE, amount);
    }
49418
public static boolean beforeNow(String date, String format, DateUnit dateUnit) {
        logger.debug("指定日期为：{}", date);
        return calc(new Date(), parse(date, format), dateUnit) > 0;
    }
1045689
public Date dateValue(String date) {
		Date value = null;
		if (date != null) {

			// Try each simple date formatter in order
			ParseException exception = null;
			for (SimpleDateFormat sdf : formatters) {
				try {
					synchronized (sdf) {
						value = sdf.parse(date);
					}
					break;
				} catch (ParseException e) {
					if (exception == null) {
						exception = e;
					}
				}
			}

			// If no value could be parsed throw the first expected parse
			// format exception
			if (value == null) {
				throw new GeoPackageException("Failed to parse date string: "
						+ date, exception);
			}

		}
		return value;
	}
383134
public static Date addDay(Date date, int amount) {
        return add(date, Calendar.DATE, amount);
    }
1055023
Duration addDays(final int amount) {
        Duration duration;
        if (amount < 0) {
            duration = getDatatypeFactory().newDuration(false, 0, 0, Math.abs(amount), 0, 0, 0);
        } else {
            duration = getDatatypeFactory().newDuration(true, 0, 0, amount, 0, 0, 0);
        }
        return duration;
    }
433578
public static final String dateIncrease(String isoString, String fmt,
                                            int field, int amount) {

        try {
            Calendar cal = GregorianCalendar.getInstance();
            cal.setTime(stringToDate(isoString, fmt, true));
            cal.add(field, amount);

            return dateToString(cal.getTime(), fmt);

        } catch (Exception ex) {
            return null;
        }
    }
1000733
public static Calendar createCalendar(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        return cal;
    }
625783
public static Date addSecond(String date, int amount) throws ParseException {
        return add(date, Calendar.SECOND, amount);
    }
854089
public static Date addMinute(Date date, int amount) {
        return add(date, Calendar.MINUTE, amount);
    }
894118
public static Date addYear(String date, int amount) throws ParseException {
        return add(date, Calendar.YEAR, amount);
    }
529053
function(date) {
			if(!date) {
				date = new Date();
			}

			if (this.time instanceof Date) {
				if (this.factory.countdown) {
					return Math.max(this.time.getTime()/1000 - date.getTime()/1000,0);
				} else {
					return date.getTime()/1000 - this.time.getTime()/1000 ;
				}
			} else {
				return this.time;
			}
		}
183698
public static Date addDays(Date date, int numberOfDays) {
    return Date.from(date.toInstant().plus(numberOfDays, ChronoUnit.DAYS));
  }
615934
public static long plus(long packedDateTime, long amountToAdd, TemporalUnit unit) {

        LocalDateTime dateTime = asLocalDateTime(packedDateTime);
        return pack(dateTime.plus(amountToAdd, unit));
    }