printHours method

String printHours(
  1. DateTime date
)

Implementation

String printHours(DateTime date) {
  final res = '${date.hour}';
  if (res.length == 1) {
    return '0$res';
  }
  return res;
}