Calculate business days difference between two days excluding holidays?
I already have a list of holidays which is a List . Given two Date object, how could I calculate the difference in working days (not counting weekends and holidays) between them? I have found the library ObjectLab Kit but I think it only knows how to advance days. Thanks
I found Jollyday useful in earlier projects.
Probably not the most efficient way, but probably fast enough: loop starting with the earliest date, add a day at each iteration until the end date, and increment a counter unless the current day is a weekend or a holiday. java.util.Calendar is the class to use. It has method to add a day to itself and check if it's a saturday or a sunday.
Splitting up the drawing of a GUI Element
How can you force recompilation of jsps in JBoss 4.2?
How do I save Eclipse launch profiles across workspaces?
GWT with a Content Management System
What is the third boolean state in java?
How do I use JUnitPerf with JWebUnit and JUnit 4?
Messaging solution for a serial hardware device
What are all the different ways to create an object in Java?
How do I force a Java subclass to define an Annotation?
Java Serialization with non serializable parts
Differences between MSIL and Java bytecode?
How does jstl's sql tag work?
Java: Best Place to Begin Learning Basic Networking [closed]
Eclipse Custom Variable for Java Code Templates
How do the Proxy, Decorator, Adapter, and Bridge Patterns differ?
How can I search a graph for a path?