Java Day of isEndOfDay(GregorianCalendar cal1)

Here you can find the source of isEndOfDay(GregorianCalendar cal1)

Description

is End Of Day

License

Open Source License

Declaration

public static boolean isEndOfDay(GregorianCalendar cal1) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.GregorianCalendar;

public class Main {
    public static final String STRING_EMPTY = "";
    public static final String END_OF_DAY = "23:59";
    public static SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm");

    public static boolean isEndOfDay(GregorianCalendar cal1) {
        return guiTimeFormat(cal1).equals(END_OF_DAY);
    }//from w  w w .  jav a2 s .  com

    /**
     * Formats a calendar object into a specified time format
     *
     * @param calendar
     * @return time in HH:mm format
     */
    public static String guiTimeFormat(GregorianCalendar calendar) {
        if (calendar == null) {
            return STRING_EMPTY;
        }
        return timeFormat.format(calendar.getTime());
    }
}

Related

  1. getWorkingDay(Calendar d1, Calendar d2)
  2. getYesday()
  3. getYYYY_MM_DD(int offsetDays)
  4. isBirthdayPartAvail(String number)
  5. isDiffIsBiggerThanMin(Date lastLogIn, Date now, Long daysL)
  6. isHoliday(Date date, String[] excludes, String[] includes)
  7. isIn(int reserveDayCount, String dateString)
  8. isInAllDayFormat(String date)
  9. isNowDay(String d)