js/ts/tsx读取excel表格中的日期格式转换

  const formatDate = (timestamp: number) => {
    const time = new Date((timestamp - 1) * 24 * 3600000 + 1);
    time.setFullYear(time.getFullYear() - 70);
    const year = time.getFullYear();
    const month = time.getMonth() + 1;
    const date = time.getDate() - 1;
    const format = ‘-‘;
    return (
      year + format + (month < 10 ? `0${month}` : month) + format + (date < 10 ? `0${date}` : date)
    );
  };

 

js/ts/tsx读取excel表格中的日期格式转换

上一篇:X86模拟龙芯与编译 .NET CoreCLR


下一篇:[PHP]解决nginx php上传文件限制413 Request Entity Too Large