// 日期格式化
    parseTime(time, pattern) {
      if (arguments.length === 0 || !time) {
        return null;
      }
      let date;
      date = new Date(time);


      var h = date.getHours();

      if (h < 10) {
        h = "0" + h;
      }
      var m = date.getMinutes();

      if (m < 10) {
        m = "0" + m;
      }
      return h + ":" + m;
    },
posted on 2023-07-02 09:58  张伯灵  阅读(11)  评论(0编辑  收藏  举报