Java Date Set setMinSeconds(Date date)

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

Description

set Min Seconds

License

Open Source License

Declaration

public static Date setMinSeconds(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 setMinSeconds(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);/*  w  w w  .ja  v a  2  s. com*/
        cal.set(Calendar.SECOND, 0);
        return cal.getTime();
    }
}

Related

  1. setHourMinuteSecondToZeroPlus24Hours(Date datetime)
  2. setHours(Date d, int hours)
  3. setHours(Date date, int amount)
  4. setMilliSecondsToDate(Date date, Integer milliSeconds)
  5. setMinDate(Date d)
  6. setMinute(Date date, int minute)
  7. setMinutes(Date date, int amount)
  8. setStartDateIfNull(java.util.Date start)
  9. setStartDay(Date date)