period property

String get period

Implementation

String get period {
  if (this is DateTime) {
    var hour = this!.hour;
    if (hour < 12) {
      return "AM";
    } else {
      return "PM";
    }
  }
  return "";
}