isDayBefore method

bool isDayBefore(
  1. DateKey arg
)

Implementation

bool isDayBefore(DateKey arg) {
  const Duration oneDay = Duration(days: 1);
  DateTime outerDateTime = DateTime(arg.year, arg.month, arg.day);
  DateTime traveledOuterDateTime = outerDateTime.subtract(oneDay);
  DateKey traveledOuterDateKey = DateKey(traveledOuterDateTime.year,
      traveledOuterDateTime.month, traveledOuterDateTime.day);
  return this == traveledOuterDateKey;
}