toFormat(fmt, opts = {}) {
    // reverse-compat since 1.2; we always round down now, never up, and we do it by default
    const fmtOpts = {
      ...opts,
      floor: opts.round !== false && opts.floor !== false,
    };
    return this.isValid
      ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)
      : INVALID;
  }
Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:
* `S` for milliseconds
* `s` for seconds
* `m` for minutes
* `h` for hours
* `d` for days
* `w` for weeks
* `M` for months
* `y` for years
Notes:
* Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
* Tokens can be escaped by wrapping with single quotes.
* The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
@param {string} fmt - the format string
@param {Object} opts - options
@param {boolean} [opts.floor=true] - floor numerical values
@example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2"
@example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002"
@example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000"
@return {string}