congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • Permission (java.security)
    Legacy security code; do not use.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm 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