test_class.file: app/src/test/java/org/berlin_vegan/bvapp/helpers/DateUtilTest.java
test_class.identifier: DateUtilTest
test_case.body: @Test
      public void testIsPublicHoliday() throws Exception {
          final Calendar calendar = GregorianCalendar.getInstance();
          calendar.set(2015, 0, 1);
          assertTrue(DateUtil.isPublicHoliday(calendar.getTime()));
  
          calendar.set(2016, 2, 28); //28 March is "Ostermontag"
          assertTrue(DateUtil.isPublicHoliday(calendar.getTime()));
  
          calendar.set(2015, 5, 5); // 5 June
          assertFalse(DateUtil.isPublicHoliday(calendar.getTime()));
  
      }
test_case.class_method_signature: DateUtilTest.testIsPublicHoliday()
test_case.full_signature: @Test public void testIsPublicHoliday()
test_case.identifier: testIsPublicHoliday
test_case.invocations: getInstance set assertTrue isPublicHoliday getTime set assertTrue isPublicHoliday getTime set assertFalse isPublicHoliday getTime
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsPublicHoliday()
focal_class.declarator: FIXED_HOLIDAYS = Arrays.asList("1.1", "1.5", "3.10", "25.12", "26.12")
focal_class.modifier: public static final
focal_class.original_string: public static final List<String> FIXED_HOLIDAYS = Arrays.asList("1.1", "1.5", "3.10", "25.12", "26.12");
focal_class.type: List<String>
focal_class.var_name: FIXED_HOLIDAYS
focal_class.declarator: DYNAMIC_HOLIDAYS = Arrays.asList("25.3.2016", "28.3.2016", "5.5.2016", "16.5.2016", "14.4.2017", "17.4.2017", "25.5.2017", "05.6.2017")
focal_class.modifier: public static final
focal_class.original_string: public static final List<String> DYNAMIC_HOLIDAYS = Arrays.asList("25.3.2016", "28.3.2016", "5.5.2016", "16.5.2016", "14.4.2017", "17.4.2017", "25.5.2017", "05.6.2017");
focal_class.type: List<String>
focal_class.var_name: DYNAMIC_HOLIDAYS
focal_class.declarator: ONE_MINUTE_IN_MILLISECONDS = 60000
focal_class.modifier: public static final
focal_class.original_string: public static final int ONE_MINUTE_IN_MILLISECONDS = 60000;
focal_class.type: int
focal_class.var_name: ONE_MINUTE_IN_MILLISECONDS
focal_class.declarator: HOURS_PER_DAY = 24
focal_class.modifier: public static final
focal_class.original_string: public static final int HOURS_PER_DAY = 24;
focal_class.type: int
focal_class.var_name: HOURS_PER_DAY
focal_class.declarator: MINUTES_PER_HOUR = 60
focal_class.modifier: public static final
focal_class.original_string: public static final int MINUTES_PER_HOUR = 60;
focal_class.type: int
focal_class.var_name: MINUTES_PER_HOUR
focal_class.declarator: MINUTES_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR
focal_class.modifier: public static final
focal_class.original_string: public static final int MINUTES_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR;
focal_class.type: int
focal_class.var_name: MINUTES_PER_DAY
focal_class.file: app/src/main/java/org/berlin_vegan/bvapp/helpers/DateUtil.java
focal_class.identifier: DateUtil
focal_class.class_method_signature: DateUtil.getDayOfWeek(Date date)
focal_class.full_signature: static public int getDayOfWeek(Date date)
focal_class.identifier: getDayOfWeek
focal_class.modifiers: static public
focal_class.parameters: (Date date)
focal_class.return: int
focal_class.signature: int getDayOfWeek(Date date)
focal_class.class_method_signature: DateUtil.isPublicHoliday(Date date)
focal_class.full_signature: static public boolean isPublicHoliday(Date date)
focal_class.identifier: isPublicHoliday
focal_class.modifiers: static public
focal_class.parameters: (Date date)
focal_class.return: boolean
focal_class.signature: boolean isPublicHoliday(Date date)
focal_class.class_method_signature: DateUtil.inMinutes(int hours, int minutes)
focal_class.full_signature: public static int inMinutes(int hours, int minutes)
focal_class.identifier: inMinutes
focal_class.modifiers: public static
focal_class.parameters: (int hours, int minutes)
focal_class.return: int
focal_class.signature: int inMinutes(int hours, int minutes)
focal_class.class_method_signature: DateUtil.addMinutesToDate(Date date, int minutes)
focal_class.full_signature: public static Date addMinutesToDate(Date date, int minutes)
focal_class.identifier: addMinutesToDate
focal_class.modifiers: public static
focal_class.parameters: (Date date, int minutes)
focal_class.return: Date
focal_class.signature: Date addMinutesToDate(Date date, int minutes)
focal_class.class_method_signature: DateUtil.formatTimeFromMinutes(int minutes)
focal_class.full_signature: static public String formatTimeFromMinutes(int minutes)
focal_class.identifier: formatTimeFromMinutes
focal_class.modifiers: static public
focal_class.parameters: (int minutes)
focal_class.return: String
focal_class.signature: String formatTimeFromMinutes(int minutes)
focal_method.body: static public boolean isPublicHoliday(Date date) {
          final Calendar calendar = GregorianCalendar.getInstance();
          calendar.setTime(date);
          final int day = calendar.get(Calendar.DAY_OF_MONTH);
          final int month = calendar.get(Calendar.MONTH) + 1;
          final int year = calendar.get(Calendar.YEAR);
  
          String dateStr = String.valueOf(day) + "." + String.valueOf(month);
          String dateStrWithYear = dateStr + "." + String.valueOf(year);
          return FIXED_HOLIDAYS.contains(dateStr) || DYNAMIC_HOLIDAYS.contains(dateStrWithYear);
      }
focal_method.class_method_signature: DateUtil.isPublicHoliday(Date date)
focal_method.full_signature: static public boolean isPublicHoliday(Date date)
focal_method.identifier: isPublicHoliday
focal_method.invocations: getInstance setTime get get get valueOf valueOf valueOf contains contains
focal_method.modifiers: static public
focal_method.parameters: (Date date)
focal_method.return: boolean
focal_method.signature: boolean isPublicHoliday(Date date)