isMorning method

bool isMorning()

Check if the date is in the morning.

Implementation

bool isMorning() {
  if (this == null) return false;
  if (this?.hour == null) return false;
  return this!.hour >= 0 && this!.hour < 12;
}