Codota Logo
HolidayHelper
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
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(EntityBlizz par1Entity) {
  return HolidayHelper.isChristmas(5, 3) ? textureXmas : texture;
}
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(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 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 isHalloween() {
  setDate(holidayStart, Calendar.OCTOBER, 30, false);
  setDate(holidayEnd, Calendar.NOVEMBER, 1, 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 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

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • findViewById (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now