text: "use strict";
  // Copyright (c) Jupyter Development Team.
  // Distributed under the terms of the Modified BSD License.
  Object.defineProperty(exports, "__esModule", { value: true });
  var moment = require("moment");
  /**
   * The namespace for date functions.
   */
  var Time;
  (function (Time) {
      /**
       * Convert a timestring to a human readable string (e.g. 'two minutes ago').
       *
       * @param value - The date timestring or date object.
       *
       * @returns A formatted date.
       */
      function formatHuman(value) {
          var time = moment(value).fromNow();
          time = time === 'a few seconds ago' ? 'seconds ago' : time;
          return time;
      }
      Time.formatHuman = formatHuman;
      /**
       * Convert a timestring to a date format.
       *
       * @param value - The date timestring or date object.
       *
       * @param format - The format string.
       *
       * @returns A formatted date.
       */
      function format(value, format) {
          if (format === void 0) { format = 'YYYY-MM-DD HH:mm'; }
          return moment(value).format(format);
      }
      Time.format = format;
  })(Time = exports.Time || (exports.Time = {}));
  