Java Hour getHourDetails(int timeInfo)

Here you can find the source of getHourDetails(int timeInfo)

Description

get Hour Details

License

Open Source License

Declaration

private static String getHourDetails(int timeInfo) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

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

public class Main {
    private static String getHourDetails(int timeInfo) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());
        cal.set(Calendar.HOUR_OF_DAY, timeInfo);
        SimpleDateFormat formatter = new SimpleDateFormat("dd/MMM/yyyy HH:MM");
        return formatter.format(cal.getTime());
    }//ww w  .  j  a  v  a 2s  . c om
}

Related

  1. getHourAfter(final Date _from, final int _hours)
  2. getHourAndMin(long time)
  3. getHourAndMinutes(Date dt)
  4. getHourBeforeTime(int hour)
  5. getHourByZore(int hour)
  6. getHourFormatedTwoDigit()
  7. getHourFromDate(Date date)
  8. getHourInt()
  9. getHourMin(Date date)