Java Date Calculate after(Date dt, Date dt2)

Here you can find the source of after(Date dt, Date dt2)

Description

A null safe check to whether dt is after dt2.

License

Apache License

Return

if dt2 is after dt

Declaration

public static boolean after(Date dt, Date dt2) 

Method Source Code

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

import java.util.*;

public class Main {
    /**/*from   w  ww  . j  av  a2s . c o m*/
     * A null safe check to whether dt is after dt2.
     *
     * @return if dt2 is after dt
     */
    public static boolean after(Date dt, Date dt2) {
        return !(dt == null || dt2 == null) && dt.after(dt2);
    }
}

Related

  1. adjust(Date date, int h, int m, int s)
  2. before(Date dt, Date dt2)
  3. before(final Date date, final long compareTime)
  4. calculaDataTermino(Date dataInicio, int prazo)
  5. calculaIdadeEmAnos(Date dDataNasc, Date dataRef)