getDateHour function

int getDateHour([
  1. int? time
])

Implementation

int getDateHour([int? time]) {
  time ??= getCurrentTimeMillis();

  _initializeDateFormatting();

  var date = DateTime.fromMillisecondsSinceEpoch(time);
  var dateFormat = DateFormat('HH');
  var s = dateFormat.format(date);
  return int.parse(s);
}