import {pad} from "../strings/pad"; export function dateToChineseFormat(date: Date) { let ret = `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`; ret += ` ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`; return ret; }