Package de.jollyday

Examples of de.jollyday.Holiday


    Set<Holiday> additionalHolidays = new HashSet<Holiday>();
    for (Holiday d : holidays) {
      LocalDate twoDaysLater = d.getDate().plusDays(2);
      if (calendarUtil.contains(holidays, twoDaysLater)) {
        LocalDate bridgingDate = twoDaysLater.minusDays(1);
        additionalHolidays.add(new Holiday(bridgingDate, BRIDGING_HOLIDAY_PROPERTIES_KEY,
            LocalizedHolidayType.OFFICIAL_HOLIDAY));
      }
    }
    holidays.addAll(additionalHolidays);
    return holidays;
View Full Code Here


      } else if (rf.getDays() != null) {
        // if number of days set -> move number of days
        fixed = fixed.plusDays(rf.getWhen() == When.BEFORE ? -rf.getDays() : rf.getDays());
      }
      HolidayType type = xmlUtil.getType(rf.getLocalizedType());
      holidays.add(new Holiday(fixed, rf.getDescriptionPropertiesKey(), type));
    }
  }
View Full Code Here

        throw new IllegalArgumentException("Unknown islamic holiday " + i.getType());
      }
      String propertiesKey = PREFIX_PROPERTY_ISLAMIC + i.getType().name();
      HolidayType type = xmlUtil.getType(i.getLocalizedType());
      for (LocalDate d : islamicHolidays) {
        holidays.add(new Holiday(d, propertiesKey, type));
      }
    }
  }
View Full Code Here

        }
        from = from.plusDays(1);
      }
      if (result != null) {
        HolidayType type = xmlUtil.getType(fwm.getLocalizedType());
        holidays.add(new Holiday(result, fwm.getDescriptionPropertiesKey(), type));
      }
    }
  }
View Full Code Here

      if (!isValid(fwm, year)) {
        continue;
      }
      LocalDate date = parse(year, fwm);
      HolidayType type = xmlUtil.getType(fwm.getLocalizedType());
      holidays.add(new Holiday(date, fwm.getDescriptionPropertiesKey(), type));
    }
  }
View Full Code Here

        throw new IllegalArgumentException("Unknown ethiopian orthodox holiday type " + h.getType());
      }
      String propertiesKey = PREFIXE_PROPERTY_ETHIOPIAN_ORTHODOX + h.getType().name();
      HolidayType type = xmlUtil.getType(h.getLocalizedType());
      for (LocalDate d : ethiopianHolidays) {
        holidays.add(new Holiday(d, propertiesKey, type));
      }
    }
  }
View Full Code Here

      int direction = (rtfw.getWhen() == When.BEFORE ? -1 : 1);
      while (date.getDayOfWeek() != xmlUtil.getWeekday(rtfw.getWeekday())) {
        date = date.plusDays(direction);
      }
      HolidayType type = xmlUtil.getType(rtfw.getLocalizedType());
      holidays.add(new Holiday(date, rtfw.getDescriptionPropertiesKey(), type));
    }
  }
View Full Code Here

        continue;
      }
      LocalDate date = calendarUtil.create(year, f);
      LocalDate movedDate = moveDate(f, date);
      HolidayType type = xmlUtil.getType(f.getLocalizedType());
      Holiday h = new Holiday(movedDate, f.getDescriptionPropertiesKey(), type);
      holidays.add(h);
    }
  }
View Full Code Here

   */
  protected void addChrstianHoliday(LocalDate day, String propertiesKey, HolidayType holidayType,
      Set<Holiday> holidays) {
    LocalDate convertedDate = calendarUtil.convertToISODate(day);
    de.jollyday.HolidayType type = xmlUtil.getType(holidayType);
    Holiday h = new Holiday(convertedDate, propertiesKey, type);
    holidays.add(h);
  }
View Full Code Here

      LocalDate day = calendarUtil.create(year, f.getDay());
      day = moveDateToFirstOccurenceOfWeekday(f, day);
      int days = determineNumberOfDays(f);
      day = f.getWhen() == When.AFTER ? day.plusDays(days) : day.minusDays(days);
      HolidayType type = xmlUtil.getType(f.getLocalizedType());
      holidays.add(new Holiday(day, f.getDescriptionPropertiesKey(), type));
    }
  }
View Full Code Here

TOP

Related Classes of de.jollyday.Holiday

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.