Java Hour getBeforeOneHour()

Here you can find the source of getBeforeOneHour()

Description

get Before One Hour

License

Apache License

Declaration

public static String getBeforeOneHour() 

Method Source Code

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

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

public class Main {
    public static String getBeforeOneHour() {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());

        return String.valueOf(cal.get(Calendar.HOUR_OF_DAY) == 0 ? 23 : cal.get(Calendar.HOUR_OF_DAY) - 1);
    }// ww  w  . j  a  va 2s .co m
}

Related

  1. convertHour(Long createAt)
  2. delayBeforeNextHour()
  3. get24Hour()
  4. getAlarmOnQuarterHour()
  5. getAnHourBack()
  6. getCalenderWithHour(int hours)
  7. getCurrentHour()
  8. getCurrentHour()
  9. getCurrentHour()