formatResetText function

String formatResetText(
  1. String resetsAt, {
  2. bool showTimezone = false,
  3. bool showTime = true,
})

Format a reset time from an ISO 8601 string.

Implementation

String formatResetText(
  String resetsAt, {
  bool showTimezone = false,
  bool showTime = true,
}) {
  final dt = DateTime.parse(resetsAt);
  return formatResetTime(
        dt.millisecondsSinceEpoch ~/ 1000,
        showTimezone: showTimezone,
        showTime: showTime,
      ) ??
      '';
}