@types/luxon
Advanced tools
Comparing version 2.0.8 to 2.0.9
{ | ||
"name": "@types/luxon", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "TypeScript definitions for luxon", | ||
@@ -73,4 +73,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/luxon", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "31565c196813fe0df5aba1076a6b70992b1c2a27bb8bf52c203eea01d44b475f", | ||
"typesPublisherContentHash": "33cf9840d5efbbce0dd119ad748e951a342ff9a7327fc0f99f5417417e84f623", | ||
"typeScriptVersion": "3.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 13 Dec 2021 21:01:05 GMT | ||
* Last updated: Sun, 09 Jan 2022 15:31:23 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: `luxon` |
@@ -62,2 +62,6 @@ import { NumberingSystem } from './misc'; | ||
export interface ToHumanDurationOptions extends Intl.NumberFormatOptions { | ||
listStyle?: 'long' | 'short' | 'narrow' | undefined; | ||
} | ||
/** | ||
@@ -227,2 +231,16 @@ * Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() | ||
/** | ||
* 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 {@link 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`. | ||
* @example | ||
* ```js | ||
* var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 }) | ||
* dur.toHuman() //=> '1 day, 5 hours, 6 minutes' | ||
* dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes' | ||
* dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min' | ||
* ``` | ||
*/ | ||
toHuman(opts?: ToHumanDurationOptions): string; | ||
/** | ||
* Returns a JavaScript object with this Duration's values. | ||
@@ -229,0 +247,0 @@ * |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112369
2666