getAmPm static method

String getAmPm(
  1. TimeOfDay time
)

Implementation

static String getAmPm(TimeOfDay time){

  return time.period == DayPeriod.am ? 'AM' : 'PM';
}