Tabnine Logo
HolidayHelper.setDate
Code IndexAdd Tabnine to your IDE (free)

How to use
setDate
method
in
cofh.core.util.helpers.HolidayHelper

Best Java code snippets using cofh.core.util.helpers.HolidayHelper.setDate (Showing top 13 results out of 315)

origin: CoFH/CoFHCore

public static boolean isUSIndependenceDay() {
  setDate(holidayStart, Calendar.JULY, 3, false);
  setDate(holidayEnd, Calendar.JULY, 5, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isAprilFools() {
  setDate(holidayStart, Calendar.MARCH, 31, false);
  setDate(holidayEnd, Calendar.APRIL, 2, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isEarthDay() {
  setDate(holidayStart, Calendar.APRIL, 21, false);
  setDate(holidayEnd, Calendar.APRIL, 23, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isVeteransDay() {
  setDate(holidayStart, Calendar.NOVEMBER, 10, false);
  setDate(holidayEnd, Calendar.NOVEMBER, 12, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isBoxingDay() {
  setDate(holidayStart, Calendar.DECEMBER, 25, false);
  setDate(holidayEnd, Calendar.DECEMBER, 27, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isStPatricksDay() {
  setDate(holidayStart, Calendar.MARCH, 16, false);
  setDate(holidayEnd, Calendar.MARCH, 18, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isValentinesDay() {
  setDate(holidayStart, Calendar.FEBRUARY, 13, false);
  setDate(holidayEnd, Calendar.FEBRUARY, 15, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isHalloween() {
  setDate(holidayStart, Calendar.OCTOBER, 30, false);
  setDate(holidayEnd, Calendar.NOVEMBER, 1, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isChristmas(int pre, int post) {
  setDate(holidayStart, Calendar.DECEMBER, 24 - pre, false);
  setDate(holidayEnd, Calendar.DECEMBER, 26 + post, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isNewYear() {
  setDate(holidayStart, Calendar.DECEMBER, 31, false);
  setDate(holidayEnd, Calendar.JANUARY, 2, true);
  holidayEnd.set(Calendar.YEAR, Calendar.YEAR + 1);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isUSThanksgiving() {
  Calendar thanksgivingCal = Calendar.getInstance();
  thanksgivingCal.clear();
  thanksgivingCal.set(Calendar.YEAR, Calendar.getInstance().get(Calendar.YEAR));
  thanksgivingCal.set(Calendar.MONTH, Calendar.NOVEMBER);
  thanksgivingCal.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);
  thanksgivingCal.set(Calendar.DAY_OF_WEEK_IN_MONTH, 4);
  setDate(holidayStart, Calendar.NOVEMBER, thanksgivingCal.get(Calendar.DAY_OF_MONTH) - 1, false);
  setDate(holidayEnd, Calendar.NOVEMBER, thanksgivingCal.get(Calendar.DAY_OF_MONTH) + 1, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

public static boolean isCAThanksgiving() {
  Calendar thanksgivingCal = Calendar.getInstance();
  thanksgivingCal.clear();
  thanksgivingCal.set(Calendar.YEAR, Calendar.getInstance().get(Calendar.YEAR));
  thanksgivingCal.set(Calendar.MONTH, Calendar.OCTOBER);
  thanksgivingCal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
  thanksgivingCal.set(Calendar.DAY_OF_WEEK_IN_MONTH, 2);
  setDate(holidayStart, Calendar.OCTOBER, thanksgivingCal.get(Calendar.DAY_OF_MONTH) - 1, false);
  setDate(holidayEnd, Calendar.OCTOBER, thanksgivingCal.get(Calendar.DAY_OF_MONTH) + 1, true);
  return dateCheck();
}
origin: CoFH/CoFHCore

  easterSunCal = new GregorianCalendar(year, 3 - 1, n); // if March
setDate(holidayStart, easterSunCal.get(Calendar.MONTH), easterSunCal.get(Calendar.DAY_OF_MONTH) - 1, false);
setDate(holidayEnd, easterSunCal.get(Calendar.MONTH), easterSunCal.get(Calendar.DAY_OF_MONTH) + 1, true);
cofh.core.util.helpersHolidayHelpersetDate

Popular methods of HolidayHelper

  • dateCheck
  • isChristmas

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now