public bool IsTheSameDateAs(ExpenditureDate date) { bool sameDate = false; sameDate = date.day == this.day ? true : false; sameDate = (date.month == this.month) && sameDate ? true : false; sameDate = (date.year == this.year) && sameDate ? true : false; return(sameDate); }
public bool IsNotLaterThan(ExpenditureDate date) { bool isEarlierThan = true; if (!(this.year <= date.year)) { isEarlierThan = false; } else if (!(this.month <= date.month) && this.year == date.year) { isEarlierThan = false; } else if (!(this.day <= date.day) && this.month == date.month && this.year == date.year) { isEarlierThan = false; } return(isEarlierThan); }