📜  将日期时间颤动到字符串 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:07.256000             🧑  作者: Mango

代码示例3
String formatTimeOfDay(TimeOfDay tod) {
    final now = new DateTime.now();
    final dt = DateTime(now.year, now.month, now.day, tod.hour, tod.minute);
    final format = DateFormat.jm();  //"6:00 AM"
    return format.format(dt);
}