1 | import { PluginFunc } from 'dayjs'
|
2 |
|
3 | declare const plugin: PluginFunc
|
4 | export = plugin
|
5 |
|
6 | type DurationInputType = string | number | object
|
7 | type DurationAddType = number | object | Duration
|
8 |
|
9 | declare class Duration {
|
10 | constructor (input: DurationInputType, unit?: string, locale?: string)
|
11 |
|
12 | clone(): Duration
|
13 |
|
14 | humanize(withSuffix: boolean): string
|
15 |
|
16 | milliseconds(): number
|
17 | asMilliseconds(): number
|
18 |
|
19 | seconds(): number
|
20 | asSeconds(): number
|
21 |
|
22 | minutes(): number
|
23 | asMinutes(): number
|
24 |
|
25 | hours(): number
|
26 | asHours(): number
|
27 |
|
28 | days(): number
|
29 | asDays(): number
|
30 |
|
31 | weeks(): number
|
32 | asWeeks(): number
|
33 |
|
34 | months(): number
|
35 | asMonths(): number
|
36 |
|
37 | years(): number
|
38 | asYears(): number
|
39 |
|
40 | as(unit: string): number
|
41 |
|
42 | get(unit: string): number
|
43 |
|
44 | add(input: DurationAddType, unit? : string): Duration
|
45 |
|
46 | subtract(input: DurationAddType, unit? : string): Duration
|
47 |
|
48 | toJSON(): string
|
49 |
|
50 | toISOString(): string
|
51 |
|
52 | locale(locale: string): Duration
|
53 | }
|
54 |
|
55 | declare module 'dayjs' {
|
56 | export function duration(input?: DurationInputType , unit?: string): Duration
|
57 | export function isDuration(d: any): d is Duration
|
58 | }
|
59 |
|
\ | No newline at end of file |