timestampToZh_yyyy_MM function

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

时间戳转yyyy年MM月

Implementation

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