formatTime function

String formatTime(
  1. DateTime date
)

date의 시각을 오전/오후 hh:mm 형식으로 바꾼다.

Implementation

String formatTime(DateTime date) {
  return DateFormat(
    'a hh:mm',
  ).format(date).replaceAll('PM', '오후').replaceAll('AM', '오전');
}