Java Date Difference diff(Date subtrahend, Date minuend, long diffField)

Here you can find the source of diff(Date subtrahend, Date minuend, long diffField)

Description

diff

License

Apache License

Declaration

public static long diff(Date subtrahend, Date minuend, long diffField) 

Method Source Code

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

import java.util.*;

public class Main {

    public static long diff(Date subtrahend, Date minuend, long diffField) {
        long diff = minuend.getTime() - subtrahend.getTime();
        return diff / diffField;
    }//from w w  w .j  a v a 2  s . c  o m
}

Related

  1. diff(Date d1, Date d2)
  2. diff(Date date1, Date date2)
  3. diff(Date date1, Date date2)
  4. diff(Date endDate, Date startDate)
  5. diff(Date sDate, Date fDate)
  6. diff(int type, Date date1, Date date2)
  7. diff_in_date(Date d1, Date d2, String type)
  8. diffBetweenMonth(Date d1, Date d2)
  9. diffCommercial(Date dateUntil, Date dateFrom, boolean bAddDay)