* Get the value of unit. * @param {string} unit - a unit such as 'minute' or 'day' * @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('day
(unit)
| 703 | * @return {number} |
| 704 | */ |
| 705 | get(unit) { |
| 706 | return this[Duration.normalizeUnit(unit)]; |
| 707 | } |
| 708 | |
| 709 | /** |
| 710 | * "Set" the values of specified units. Return a newly-constructed Duration. |
no test coverage detected