calculateDateDifference function

bool calculateDateDifference(
  1. DateTime date
)

Calculates the date difference between the date provided and the current date

Implementation

bool calculateDateDifference(DateTime date) {
  DateTime now = DateTime.now();
  if(DateTime(date.year, date.month, date.day).difference(DateTime(now.year, now.month, now.day)).inDays > 0){
    return true;
  }else{
    return false;
  }
}