Android Date Equal equal(Date date1, Date date2)

Here you can find the source of equal(Date date1, Date date2)

Description

equal

License

Open Source License

Declaration

public static boolean equal(Date date1, Date date2) 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static SimpleDateFormat dateFormater = new SimpleDateFormat(
            "yyyy-MMM-dd");

    public static boolean equal(Date date1, Date date2) {
        return dateFormater.format(date1)
                .equals(dateFormater.format(date2));
    }/* w  w w . ja  v  a  2s. c  om*/
}

Related

  1. isSameInstant(Date date1, Date date2)