formatDateTimeline static method

String formatDateTimeline(
  1. DateTime dateTime,
  2. bool isPath
)

2018-07-24 00_00_00 路径需要在天数和小时之间用下划线替换空格

Implementation

static String formatDateTimeline(DateTime dateTime, bool isPath) {
  return formatDate(
      dateTime, [yyyy, '-', mm, '-', dd, isPath? '_':' ', HH, '_', nn, '_', ss]);
}