日期增加-按年增加

@param date
@param mnt
@return java.util.Date
335570
public static String dateIncreaseByYearforString(String date, int mnt) {
        Date date1 = stringToDate(date);
        Calendar cal = GregorianCalendar.getInstance();
        cal.setTime(date1);
        cal.add(Calendar.YEAR, mnt);
        String ss = dateToString(cal.getTime(), ISO_DATE_FORMAT);
        return dateIncreaseByDay(ss, -1);
    }
300314
public Query addDateParameter(java.util.Date date) {
        return addParameter(new Date(date.getTime()));
    }
11157
public static Integer getDayOfYear(Date date) {

        if (date == null)
            return null;

        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);

        return calendar.get(Calendar.DAY_OF_YEAR);
    }
1344793
public static Date addMonth(Date date, int amt) {
		return addDateField(date,Calendar.MONTH,amt);
	}
243451
public static Date add(DateUnit dateUnit, int amount, String date, String format) {
        LocalDateTime localDateTime = getTime(format, date);
        localDateTime = localDateTime.plus(amount, create(dateUnit));
        return Date.from(localDateTime.toInstant(ZoneOffset.ofTotalSeconds(60 * 60 * 8)));
    }
636136
function(date) {
        var minDate = this.cfg.getProperty(DEF_CFG.MINDATE.key),
            maxDate = this.cfg.getProperty(DEF_CFG.MAXDATE.key),
            dm = DateMath;
        
        if (minDate) {
            minDate = dm.clearTime(minDate);
        } 
        if (maxDate) {
            maxDate = dm.clearTime(maxDate);
        }
    
        var clearedDate = new Date(date.getTime());
        clearedDate = dm.clearTime(clearedDate);
    
        return ((minDate && clearedDate.getTime() < minDate.getTime()) || (maxDate && clearedDate.getTime() > maxDate.getTime()));
    }
432627
public static DateValue toDateValue(DateValue date) {
		return (date instanceof TimeValue) ? new DateValueImpl(date.year(), date.month(), date.day()) : date;
	}
749965
public static String addDayByString(String date, int addDay) {
        String retDate = "";
        // 空值校验
        if (date == null || "".equals(date)
                || "".equals(date.replaceAll("-", "").trim())) {
            return retDate;
        }
        Date date1 = stringToDate(date);
        Calendar c = Calendar.getInstance();
        c.setTime(date1); // 设置当前日期
        c.add(Calendar.DATE, addDay); // 日期加1
        Date resultDate = c.getTime(); // 结果
        return dateToString(resultDate);
    }
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;
	}
1283676
public static Date newDate(final int year, final int month, final int day, final int hour,
		final int min, final int sec)
	{
		return newDate(year, month, day, hour, min, sec, 0);
	}
255696
def add_date(self, date):
        
        self.lines = self.parser.add_date(date, self.lines)
1093646
public static DateValue getInstance(Date date) {
        DateValue result;
        if (date != null) {
            synchronized (cache) {
                result = cache.get(date);
                if (result == null) {
                    result = new DateValue(date);
                    cache.put(date, result);
                }
            }
        } else {
            result = getInstance(new Date());
        }
        return result;
    }
97803
private Integer getIntegerTimeInMinutes(Date date)
   {
      Integer result = null;
      if (date != null)
      {
         Calendar cal = DateHelper.popCalendar(date);
         int time = cal.get(Calendar.HOUR_OF_DAY) * 60;
         time += cal.get(Calendar.MINUTE);
         DateHelper.pushCalendar(cal);
         result = Integer.valueOf(time);         
      }
      return (result);
   }
191079
public final boolean add(final Date date) {
        if (!this.isUtc() && this.getTimeZone() == null) {
            /* If list hasn't been initialized yet use defaults from the first added date element */
            if (date instanceof DateTime) {
                DateTime dateTime = (DateTime) date;
                if (dateTime.isUtc()) {
                    this.setUtc(true);
                } else {
                    this.setTimeZone(dateTime.getTimeZone());
                }
            }
        }
        if (date instanceof DateTime) {
            DateTime dateTime = (DateTime) date;
            if (isUtc()) {
                dateTime.setUtc(true);
            } else {
                dateTime.setTimeZone(getTimeZone());
            }
        } else if (!Value.DATE.equals(getType())) {
            final DateTime dateTime = new DateTime(date);
            dateTime.setTimeZone(getTimeZone());
            return dates.add(dateTime);
        }
        return dates.add(date);
    }
20161
public static Date addYear(Date date, int amt) {
		return addDateField(date,Calendar.YEAR,amt);
	}
991198
public static int getDayOfYear(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);
        return c.get(Calendar.DAY_OF_YEAR);
    }
1083260
@SuppressWarnings("unchecked")
    public T date( Date... date ) {
        if (checkIfNull(date)) {
            return (T) this;
        }
        date = ensureDateNotTimestamp(date);
        addObjectParameter(DATE_LIST, "date", date);
        return (T) this;
    }