congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
HolidayHelper
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: CoFH/CoFHCore

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

@Override
protected ResourceLocation getEntityTexture(EntityBlizz par1Entity) {
  return HolidayHelper.isChristmas(5, 3) ? textureXmas : texture;
}
origin: CoFH/CoFHCore

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

@Override
protected ResourceLocation getEntityTexture(EntityBlitz par1Entity) {
  return HolidayHelper.isChristmas(5, 3) ? textureXmas : texture;
}
origin: CoFH/CoFHCore

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

@Override
protected ResourceLocation getEntityTexture(EntityBasalz entity) {
  return HolidayHelper.isChristmas(5, 3) ? textureXmas : texture;
}
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 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 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

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

  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);
return dateCheck();
cofh.core.util.helpersHolidayHelper

Javadoc

The class contains helper functions related to Holidays! The holidays intentionally begin a day before the actual holiday and end one day after it. Yes, they are US-centric. Feel free to suggest others!

Most used methods

  • dateCheck
  • isChristmas
  • setDate

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JButton (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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