isDateChangedComparedTo method

bool isDateChangedComparedTo(
  1. Message message,
  2. Message other
)

Implementation

bool isDateChangedComparedTo(Message message, Message other) {
  final thisDate = DateTime.tryParse(message.timestamp);
  final otherDate = DateTime.tryParse(other.timestamp);
  if (thisDate == null || otherDate == null) {
    return false;
  }
  return thisDate.day != otherDate.day ||
      thisDate.month != otherDate.month ||
      thisDate.year != otherDate.year;
}