Java Date to Minute getMinTime(Date date)

Here you can find the source of getMinTime(Date date)

Description

get Min Time

License

Open Source License

Declaration

public static Date getMinTime(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {

    public static Date getMinTime(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);// w w w.  j a va2  s .  c  om
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar.getTime();
    }
}

Related

  1. getMinDateOfDay(Date date)
  2. getMinHour(Date date)
  3. getMins(Date date)
  4. getMinus1Day(Date date)
  5. getMinute(Date d)
  6. getMinute(Date d)
  7. getMinute(Date date)