timestampToNormal_yyyy_MM_dd function

String timestampToNormal_yyyy_MM_dd(
  1. int timestamp, {
  2. bool isUtc = false,
})

时间戳转yyyy-MM-dd

Implementation

// ignore: non_constant_identifier_names
String timestampToNormal_yyyy_MM_dd(int timestamp, {bool isUtc = false}) {
  DateTime dateTime = timestampToDateTime(timestamp, isUtc: isUtc);
  return '${dateTime.year}-${twoDigits(dateTime.month)}-${twoDigits(dateTime.day)}';
}