Package de.jollyday

Examples of de.jollyday.HolidayType


        } while (fixed.getDayOfWeek() != day);
      } 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


        break;
      default:
        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

          break;
        }
        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

    for (FixedWeekdayInMonth fwm : config.getFixedWeekday()) {
      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

        break;
      default:
        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

      LocalDate date = parse(year, rtfw.getFixedWeekday());
      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

      if (!isValid(f, year)) {
        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

      }
      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.HolidayType

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.