Java Date Add add(Date date, int field, int value)

Here you can find the source of add(Date date, int field, int value)

Description

add

License

Apache License

Declaration

private static Date add(Date date, int field, int value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    private static Date add(Date date, int field, int value) {
        Calendar cal = Calendar.getInstance();
        cal.setTimeInMillis(date.getTime());
        cal.add(field, value);//from  w w  w  .j  a  va  2  s .  c  om
        return cal.getTime();
    }
}

Related

  1. add(Date date, int calendarField, int amount)
  2. add(Date date, int calendarField, int amount)
  3. add(Date date, int field, int amount)
  4. add(Date date, int field, int amount)
  5. add(Date date, int field, int diff)
  6. add(Date date, int field, long amount)
  7. add(Date date, int x)
  8. add(Date date, long minutes)
  9. add(Date eredeti, int mihez, int mennyit)