I've come up with a solution. Would someone mind reviewing the attached
patch to confirm that I'm handling it in a sensible manner?
--
Adam Monsen
Index: test/org/mifos/application/customer/client/struts/action/TestClientCustAction.java
===================================================================
--- test/org/mifos/application/customer/client/struts/action/TestClientCustAction.java (revision 12335)
+++ test/org/mifos/application/customer/client/struts/action/TestClientCustAction.java (working copy)
@@ -1774,6 +1774,11 @@
int year = currentDateCalendar.get(Calendar.YEAR);
int month = currentDateCalendar.get(Calendar.MONTH);
int day = currentDateCalendar.get(Calendar.DAY_OF_MONTH);
+ if (month == Calendar.FEBRUARY && day == 29) {
+ // if this is the "leap year day", just force the date
+ // back a day to try and work around leap year bugs
+ day--;
+ }
currentDateCalendar = new GregorianCalendar(year - noOfyears, month,
day);
return new java.sql.Date(currentDateCalendar.getTimeInMillis());
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/