Java Day From clearDay(long timeInMillis)

Here you can find the source of clearDay(long timeInMillis)

Description

clear Day

License

Apache License

Declaration

public static long clearDay(long timeInMillis) 

Method Source Code

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

import java.util.*;

public class Main {
    public static long clearDay(long timeInMillis) {
        /*/*from  w  ww .j  a va2  s .  com*/
            final int offset = timeZone.getOffset( timeInMillis );
          timeInMillis += offset;
          return (timeInMillis / aDAY) * aDAY;
        */
        Calendar cal = Calendar.getInstance();
        cal.setTimeInMillis(timeInMillis);
        cal.set(Calendar.MILLISECOND, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.HOUR_OF_DAY, 0);

        return cal.getTimeInMillis();

    }
}

Related

  1. calculateDate(Date startDay, int days)
  2. calculatorStartTimeOnDay(Date date)
  3. CompareDay(Date orgin, Date target)
  4. convertYYMMDDToDate(int y, int m, int d, boolean beginning_of_day)
  5. createInDays(final Date from, final int amount)
  6. day(Integer time)