formatByDateTime static method

String formatByDateTime(
  1. DateTime dateTime, {
  2. DateTime? locDateTime,
  3. String? locale,
  4. DayFormat? dayFormat,
})

format time by DateTime. dateTime locDateTime: current time or schedule time. locale: output key.

Implementation

static String formatByDateTime(
  DateTime dateTime, {
  DateTime? locDateTime,
  String? locale,
  DayFormat? dayFormat,
}) {
  return format(
    dateTime.millisecondsSinceEpoch,
    locTimeMs: locDateTime?.millisecondsSinceEpoch,
    locale: locale,
    dayFormat: dayFormat,
  );
}