Skip to content

Commit

Permalink
Improve Duration#toHuman docblock (#1534)
Browse files Browse the repository at this point in the history
  • Loading branch information
Renegade334 authored Nov 12, 2023
1 parent c8a8fa2 commit 8ef0828
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,10 @@ export default class Duration {

/**
* Returns a string representation of a Duration with all units included.
* To modify its behavior use the `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
* @param opts - On option object to override the formatting. Accepts the same keys as the options parameter of the native `Int.NumberFormat` constructor, as well as `listStyle`.
* To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
* @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.
* @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.
* @example
* ```js
* var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
Expand Down

0 comments on commit 8ef0828

Please sign in to comment.