Java Today getToday(int hour, int minute, int second)

Here you can find the source of getToday(int hour, int minute, int second)

Description

get Today

License

Open Source License

Declaration

public static Date getToday(int hour, int minute, int second) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Date getToday(int hour, int minute, int second) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, hour);
        calendar.set(Calendar.MINUTE, minute);
        calendar.set(Calendar.SECOND, second);
        //calendar.set(Calendar.MILLISECOND, 0);

        return calendar.getTime();
    }//from   ww  w.j  av  a  2  s .  c o  m
}

Related

  1. getToday()
  2. getToday()
  3. getToday()
  4. getToday(boolean ceOrTw, String deli)
  5. getToDay(boolean withTime)
  6. getToday(String datePattern)
  7. getToday(String format)
  8. getToday(String formatString)
  9. getToday(String time)