Package org.projectforge.calendar

Examples of org.projectforge.calendar.Holidays


    assertEquals(HolidayDefinition.XMAS_EVE, holiday.getId());
    holiday = config.getHolidays().get(3);
    assertEquals(HolidayDefinition.SHROVE_TUESDAY, holiday.getId());
    assertEquals(true, holiday.isIgnore());

    final Holidays holidays = Holidays.getInstance();
    final Calendar cal = Calendar.getInstance();
    cal.set(Calendar.YEAR, 2009);
    cal.set(Calendar.MONTH, Calendar.MAY);
    cal.set(Calendar.DAY_OF_MONTH, 1);
    assertEquals("Should be there.", true, holidays.isHoliday(2009, cal.get(Calendar.DAY_OF_YEAR)));
    cal.set(Calendar.MONTH, Calendar.FEBRUARY);
    cal.set(Calendar.DAY_OF_MONTH, 23);
    assertEquals("Should be there.", true, holidays.isHoliday(2009, cal.get(Calendar.DAY_OF_YEAR)));
    cal.set(Calendar.DAY_OF_MONTH, 24);
    assertEquals("Should be ignored.", false, holidays.isHoliday(2009, cal.get(Calendar.DAY_OF_YEAR)));
  }
View Full Code Here

TOP

Related Classes of org.projectforge.calendar.Holidays

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.