Java Date Add add(int datePart, int detal, Date date)

Here you can find the source of add(int datePart, int detal, Date date)

Description

add

License

Open Source License

Declaration

private static Date add(int datePart, int detal, Date date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {
    private static Date add(int datePart, int detal, Date date) {
        Calendar c = Calendar.getInstance();
        if (date != null)
            c.setTime(date);//from   w w  w. j a  v  a2 s . c  o  m
        c.add(datePart, detal);
        return c.getTime();
    }
}

Related

  1. add(Date date, int field, long amount)
  2. add(Date date, int x)
  3. add(Date date, long minutes)
  4. add(Date eredeti, int mihez, int mennyit)
  5. add(Date when, int amount, int field)
  6. add(int field, int value, Date fromDate)
  7. add(long date, int field, int amount)
  8. add30Minutes(Date date)
  9. addCertainTime(java.util.Date date, double hours)