Android Date Offset thirdDayWithHour()

Here you can find the source of thirdDayWithHour()

Description

third Day With Hour

Declaration

public static Date thirdDayWithHour() 

Method Source Code

//package com.java2s;
import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date thirdDayWithHour() {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());
        cal.add(Calendar.DAY_OF_MONTH, 2);
        int hour = cal.get(Calendar.HOUR_OF_DAY) + 1;
        cal.set(Calendar.HOUR_OF_DAY, hour);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }//from   w  w w .ja  v a 2 s.  c  o  m
}

Related

  1. getTimeWithFormat(int year, int month, int day, int hour, int minute)
  2. getDateFormOffset(int months, int days, int hours, int minutes)
  3. getDateAndTimeWithShortFormat(boolean withYear, int year, int month, int day, int hour, int minute)
  4. convertToUnixTimeOneDayLater(Date date)