src/main/java/pw/phylame/util/DateUtils.java
/**
     * Modifies date field with specified value.
     * @param date the origin date
     * @param field date field
     * @param value new value in field
     * @return the new date
     * @see Calendar
     */
Modifies date field with specified value.
Modifies date field with specified value .
public static Date modifyDate(Date date, int field, int value) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(field, value);
        return calendar.getTime();
    }
public static Date modifyDate ( Date date , int field , int value ) { Calendar calendar = Calendar . getInstance ( ) ; calendar . setTime ( date ) ; calendar . set ( field , value ) ; return calendar . getTime ( ) ; }
Modifies date field with specified value.
Modifies date field with specified value .