Created
June 14, 2011 16:40
-
-
Save lonelydimple/1025292 to your computer and use it in GitHub Desktop.
NH incentive logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private double calculate2011NHAdjustment() { | |
EasyDate abeyanceDate = aPrincipal.getAbeyanceDate(); | |
EasyDate giaDate = aPrincipal.getGiaDate(); | |
String abeyanceYear = abeyanceDate == null ? "" : abeyanceDate.getDateAsString("YYYY"); | |
String giaYear = giaDate == null ? "" : giaDate.getDateAsString("YYYY"); | |
if (abeyanceYear.equals("2011") && giaYear.equals("2011")) { | |
System.out.println("Account activaton dates are eligible"); | |
EasyDate endDate = new EasyDate(giaDate.getDateAsString("MM") + "/" + | |
giaDate.getDateAsString("DD") + "/" + | |
"2012"); | |
if (effectiveDate.daysDiff(endDate) <= 0) { | |
System.out.println("Effective date is within incentive range"); | |
return 0.1; | |
} | |
} | |
return 0.0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment