當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript moment-timezone-with-data.moment-timezone-with-data函數代碼示例

本文整理匯總了TypeScript中moment-timezone/builds/moment-timezone-with-data.moment-timezone-with-data函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript moment-timezone-with-data函數的具體用法?TypeScript moment-timezone-with-data怎麽用?TypeScript moment-timezone-with-data使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了moment-timezone-with-data函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: isDate

  return name.reduce((prev, curr, index, arr) => {
    let processed = isDate(curr) ?
      moment(curr.timestamp).format('YYYY-MM-DD') :
      String(curr);

    return index === 0 ? processed: `${prev}, ${processed}`;
  }, '');
開發者ID:twosigma,項目名稱:beaker-notebook,代碼行數:7,代碼來源:column.ts

示例2: shouldStartBoxZooming

 shouldStartBoxZooming(zoomStarted: any) {
   return (
     Math.abs(this.scope.mousep1.x - this.scope.mousep2.x) > 10
     && Math.abs(this.scope.mousep1.y - this.scope.mousep2.y) > 10
     && moment() - zoomStarted > QUICK_ZOOM_DEBOUNCE_TIME
   );
 };
開發者ID:twosigma,項目名稱:beaker-notebook,代碼行數:7,代碼來源:BoxZoom.ts

示例3:

    this.datepicker[0].addEventListener('keyup', (event) => {
      event.preventDefault();
      event.stopPropagation();

      const dateStr = this.datepicker[0].value;
      if (dateStr && dateStr.length >= 8 && moment(dateStr).isValid()) {
        this.flatpickr.setDate(dateStr, true, this.flatpickr.config.dateFormat);
      }
    }, true);
開發者ID:twosigma,項目名稱:beaker-notebook,代碼行數:9,代碼來源:datePickerWidget.ts

示例4: applyTimezone

  export function applyTimezone(timestamp, tz) {
    const time = moment(timestamp, 'x');

    if (!tz) {
      return time;
    }

    if (tz.startsWith("GMT")) {
      time.utcOffset(tz);
    } else {
      time.tz(tz);
    }

    return time;
  }
開發者ID:twosigma,項目名稱:beaker-notebook,代碼行數:15,代碼來源:dataGridHelpers.ts

示例5: moment

 ).callsFake((value) => moment(new Date(value)).format(TIME_UNIT_FORMATS.DATETIME.format));
開發者ID:twosigma,項目名稱:beaker-notebook,代碼行數:1,代碼來源:DataFormatter.spec.ts


注:本文中的moment-timezone/builds/moment-timezone-with-data.moment-timezone-with-data函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。