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
public class VerifyDate { | |
//method to handle potential checks against two dates | |
public static Date CheckDates(Date date1, Date date2) { | |
//if date2 is within the next 30 days of date1, use date2. Otherwise use the end of the month | |
if(DateWithin30Days(date1,date2)) { | |
return date2; | |
} else { | |
return SetEndOfMonthDate(date1); | |
} |