DateBench was originally intended to provide comparison values for testing date routines in other software. The focus was on code being modified for the millennium change. It was also a demonstration of the WysDoM methodology. DateBench provides a specification of a number of date manipulation routines and a set of Java classes that implement these specifications. The Waysys web site contained a set of Java applets to exercise the Java code. Is there a use for DateBench after the Year 2000?
We have found several uses for DateBench since 2000:
•The WayDate Java class is easier to use and avoids certain problems compared to the Java Date class.
•The WayDate class supports operations that allow dates to be conveniently stored as integers in a database and then reconstructed as a date.
•Holiday class supports calculation of the dates of United States federal holidays.
•The DateBench specification proves to be a useful component of the Specification Library.
•The DateBench applets provide a convenient means of performing various date calculations.
As a result, we have upgraded DateBench in several ways:
•The Java code has been updated to reflect changes in Java since the code was originally written in 1997. These changes include implementing the Serializable, Comparable, and Cloneable interfaces.
•The WayDate class was refactor to use the Bridge pattern. The class wraps two other classes: one optimized for calculation and one for display.
•The Test Case Code has been rewritten to use the JUnit framework.
•The applets were modified to use Swing.
•A Holiday applet was added.
In 2012, the Java code has been upgraded, based on using the code in applications, particular Android applications.
•WayDate instances have been made nearly immutable, meaning that operations that change the date generate a new instance of the date. However, the class is not thread safe, since some operations cause changes to the internal state.
•Additional functions have been added to convert dates to and from strings.
•Additional comparison functions to make comparison easier.
•The applets were repackaged in a Jar file rather than separate class files.
•Easter calculation was added to the list of holidays.