Answers for "compare date month and year in datetime in flutter"

0

compare date month and year in datetime in flutter

Since I asked this, extension methods have been released in Dart. I would now 
implement option 1 as an extension method:

extension DateOnlyCompare on DateTime {
  bool isSameDate(DateTime other) {
    return this.year == other.year && this.month == other.month
           && this.day == other.day;
  }
}

About Extensions :
https://dart.dev/guides/language/extension-methods
Posted by: Guest on March-15-2021

Code answers related to "compare date month and year in datetime in flutter"

Browse Popular Code Answers by Language