Skip to content

Commit

Permalink
[docs] Update Duration#get docs to show get method use (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed May 8, 2021
1 parent d0ed527 commit 2b1c557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/duration.js
Expand Up @@ -593,9 +593,9 @@ export default class Duration {
/**
* Get the value of unit.
* @param {string} unit - a unit such as 'minute' or 'day'
* @example Duration.fromObject({years: 2, days: 3}).years //=> 2
* @example Duration.fromObject({years: 2, days: 3}).months //=> 0
* @example Duration.fromObject({years: 2, days: 3}).days //=> 3
* @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2
* @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0
* @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3
* @return {number}
*/
get(unit) {
Expand Down

0 comments on commit 2b1c557

Please sign in to comment.