code: function convertToTimestamp(value) {
      if (value instanceof Date) {
        return value.getTime();
      } else if (typeof value === 'number') {
        return Math.floor(value);
      } else if (typeof value === 'string') {
        return Date.parse(value);
      } else {
        return NaN;
      }
    }
docs: Converts the given date representation to a timestamp that represents the number of ms since the Unix epoch