/
index.d.test.ts
91 lines (49 loc) · 1.23 KB
/
index.d.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import * as dayjs from 'dayjs'
dayjs()
dayjs('1993-03-1')
dayjs(730944000000)
dayjs(new Date(1993, 3, 1))
dayjs('05/02/69 1:02:03 PM -05:00', 'MM/DD/YY H:mm:ss A Z')
dayjs('05/02/69 1:02:03 PM -05:00', { format: 'MM/DD/YY H:mm:ss A Z' })
dayjs('1993-03-1', { locale: 'ja' })
dayjs().clone()
dayjs().isValid()
dayjs().year()
dayjs().month()
dayjs().date()
dayjs().day()
dayjs().hour()
dayjs().minute()
dayjs().second()
dayjs().millisecond()
dayjs().set('month', 3)
dayjs().set('second', 30)
dayjs().add(7, 'day')
dayjs().subtract(7, 'year')
dayjs().startOf('year')
dayjs().endOf('month')
dayjs().startOf('month').add(1, 'day').subtract(1, 'year')
dayjs().format()
dayjs().format('[YYYY] MM-DDTHH:mm:ssZ')
dayjs().diff(dayjs(), 'year')
dayjs().valueOf()
dayjs().unix()
dayjs().daysInMonth()
dayjs().toDate()
dayjs().toArray()
dayjs().toJSON()
dayjs().toISOString()
dayjs().toObject()
dayjs().toString()
dayjs().isBefore(dayjs())
dayjs().isSame(dayjs())
dayjs().isAfter(dayjs())
dayjs().isBefore(dayjs(), 'minute')
dayjs().isSame(dayjs(), 'hour')
dayjs().isAfter(dayjs(), 'year')
dayjs('2000-01-01').isLeapYear()
dayjs.extend((o, c, d) => {
o.locale.trim()
new c().unix() // eslint-disable-line new-cap
d().unix()
})