|
|
@@ -19,6 +19,7 @@ package org.apache.poi.ss.formula.atp; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Calendar; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashSet; |
|
|
@@ -49,20 +50,13 @@ public class WorkdayCalculator { |
|
|
|
new HashSet<>(Arrays.asList(Calendar.THURSDAY, Calendar.FRIDAY)); |
|
|
|
private static final Set<Integer> friSatWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.FRIDAY, Calendar.SATURDAY)); |
|
|
|
private static final Set<Integer> monWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.MONDAY)); |
|
|
|
private static final Set<Integer> tuesWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.TUESDAY)); |
|
|
|
private static final Set<Integer> wedsWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.WEDNESDAY)); |
|
|
|
private static final Set<Integer> thursWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.THURSDAY)); |
|
|
|
private static final Set<Integer> friWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.FRIDAY)); |
|
|
|
private static final Set<Integer> satWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.SATURDAY)); |
|
|
|
private static final Set<Integer> sunWeekend = |
|
|
|
new HashSet<>(Arrays.asList(Calendar.SUNDAY)); |
|
|
|
private static final Set<Integer> monWeekend = Collections.singleton(Calendar.MONDAY); |
|
|
|
private static final Set<Integer> tuesWeekend = Collections.singleton(Calendar.TUESDAY); |
|
|
|
private static final Set<Integer> wedsWeekend = Collections.singleton(Calendar.WEDNESDAY); |
|
|
|
private static final Set<Integer> thursWeekend = Collections.singleton(Calendar.THURSDAY); |
|
|
|
private static final Set<Integer> friWeekend = Collections.singleton(Calendar.FRIDAY); |
|
|
|
private static final Set<Integer> satWeekend = Collections.singleton(Calendar.SATURDAY); |
|
|
|
private static final Set<Integer> sunWeekend = Collections.singleton(Calendar.SUNDAY); |
|
|
|
private static final Map<Integer, Set<Integer>> weekendTypeMap = new HashMap<>(); |
|
|
|
|
|
|
|
static { |