Java Calendar Calculate isAfterWorkTime(Calendar start)

Here you can find the source of isAfterWorkTime(Calendar start)

Description

Determines whether or not the date is after the start of the work day

License

Apache License

Declaration

public static boolean isAfterWorkTime(Calendar start) 

Method Source Code

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

import java.util.*;

public class Main {
    /**//from w ww.  j  a  v a 2  s  .  c  o m
     * The default when the workday ends (5PM)
     */
    public static final int END_WORKDAY = 17;

    /**
     * Determines whether or not the date is after the start of the work day
     *
     * @see #END_WORKDAY
     */
    public static boolean isAfterWorkTime(Calendar start) {
        final int hourOfDay = start.get(Calendar.HOUR_OF_DAY);
        return hourOfDay >= END_WORKDAY;
    }
}

Related

  1. getGregorianCalendar(String yyyymmdd)
  2. getLongTime(Calendar cal)
  3. getTimeStr3(Calendar timeInstance)
  4. getTimeString(Calendar cal)
  5. getTimeStrWithMillisecond(Calendar timeInstance)
  6. isInWorkTime(Calendar start)
  7. isSameInstant(Calendar cal1, Calendar cal2)
  8. isSameLocalTime(Calendar cal1, Calendar cal2)
  9. maximizeTime(Calendar cal)