Java Hour resetHourMillisToZero(long millis)

Here you can find the source of resetHourMillisToZero(long millis)

Description

reset Hour Millis To Zero

License

Apache License

Declaration

public static long resetHourMillisToZero(long millis) 

Method Source Code


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

import java.util.Calendar;

public class Main {
    public static long resetHourMillisToZero(long millis) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(millis);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar.getTimeInMillis();
    }//from  w w  w  .jav a 2s. com
}

Related

  1. hours(int hours)
  2. hoursAndMinsToMilliseconds(int sign, int hours, int minutes)
  3. isHour(int hour)
  4. nextHour(Date date)
  5. nextHour(int hour)
  6. tomrrow(int hour, int minute, int second)