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}) {
  int? _locDateTime = (locDateTime?.millisecondsSinceEpoch);
  return format(dateTime.millisecondsSinceEpoch,
      locTimeMillis: _locDateTime, locale: locale, dayFormat: dayFormat);
}