date-manip / types
types
Interfaces
DateAddingObject
Defined in: src/types/index.d.ts:1
Extended by
Properties
d?
optional
d:number
Defined in: src/types/index.d.ts:21
day?
optional
day:number
Defined in: src/types/index.d.ts:4
days?
optional
days:number
Defined in: src/types/index.d.ts:12
h?
optional
h:number
Defined in: src/types/index.d.ts:22
hour?
optional
hour:number
Defined in: src/types/index.d.ts:5
hours?
optional
hours:number
Defined in: src/types/index.d.ts:13
m?
optional
m:number
Defined in: src/types/index.d.ts:23
M?
optional
M:number
Defined in: src/types/index.d.ts:20
millisecond?
optional
millisecond:number
Defined in: src/types/index.d.ts:8
milliseconds?
optional
milliseconds:number
Defined in: src/types/index.d.ts:16
minute?
optional
minute:number
Defined in: src/types/index.d.ts:6
minutes?
optional
minutes:number
Defined in: src/types/index.d.ts:14
month?
optional
month:number
Defined in: src/types/index.d.ts:3
months?
optional
months:number
Defined in: src/types/index.d.ts:11
ms?
optional
ms:number
Defined in: src/types/index.d.ts:25
s?
optional
s:number
Defined in: src/types/index.d.ts:24
second?
optional
second:number
Defined in: src/types/index.d.ts:7
seconds?
optional
seconds:number
Defined in: src/types/index.d.ts:15
y?
optional
y:number
Defined in: src/types/index.d.ts:19
Y?
optional
Y:number
Defined in: src/types/index.d.ts:18
year?
optional
year:number
Defined in: src/types/index.d.ts:2
years?
optional
years:number
Defined in: src/types/index.d.ts:10
DateParsingObject
Defined in: src/types/index.d.ts:39
Extends
Properties
d?
optional
d:number
Defined in: src/types/index.d.ts:21
Inherited from
day?
optional
day:number
Defined in: src/types/index.d.ts:4
Inherited from
days?
optional
days:number
Defined in: src/types/index.d.ts:12
Inherited from
h?
optional
h:number
Defined in: src/types/index.d.ts:22
Inherited from
hour?
optional
hour:number
Defined in: src/types/index.d.ts:5
Inherited from
hours?
optional
hours:number
Defined in: src/types/index.d.ts:13
Inherited from
m?
optional
m:number
Defined in: src/types/index.d.ts:23
Inherited from
M?
optional
M:number
Defined in: src/types/index.d.ts:20
Inherited from
millisecond?
optional
millisecond:number
Defined in: src/types/index.d.ts:8
Inherited from
milliseconds?
optional
milliseconds:number
Defined in: src/types/index.d.ts:16
Inherited from
minute?
optional
minute:number
Defined in: src/types/index.d.ts:6
Inherited from
minutes?
optional
minutes:number
Defined in: src/types/index.d.ts:14
Inherited from
month?
optional
month:number
Defined in: src/types/index.d.ts:3
Inherited from
months?
optional
months:number
Defined in: src/types/index.d.ts:11
Inherited from
ms?
optional
ms:number
Defined in: src/types/index.d.ts:25
Inherited from
s?
optional
s:number
Defined in: src/types/index.d.ts:24
Inherited from
second?
optional
second:number
Defined in: src/types/index.d.ts:7
Inherited from
seconds?
optional
seconds:number
Defined in: src/types/index.d.ts:15
Inherited from
utcOffset?
optional
utcOffset:number
Defined in: src/types/index.d.ts:40
y?
optional
y:number
Defined in: src/types/index.d.ts:19
Inherited from
Y?
optional
Y:number
Defined in: src/types/index.d.ts:18
Inherited from
year?
optional
year:number
Defined in: src/types/index.d.ts:2
Inherited from
years?
optional
years:number
Defined in: src/types/index.d.ts:10
Inherited from
IDateChain
Defined in: src/types/index.d.ts:117
Methods
add()
Call Signature
add(
input
):this
Defined in: src/types/index.d.ts:118
Parameters
input
Returns
this
Call Signature
add(
num
,unit
):this
Defined in: src/types/index.d.ts:119
Parameters
num
number
unit
Returns
this
addDays()
addDays(
days
):this
Defined in: src/types/index.d.ts:120
Parameters
days
number
Returns
this
addHours()
addHours(
hours
):this
Defined in: src/types/index.d.ts:121
Parameters
hours
number
Returns
this
addMilliseconds()
addMilliseconds(
ms
):this
Defined in: src/types/index.d.ts:122
Parameters
ms
number
Returns
this
addMinutes()
addMinutes(
minutes
):this
Defined in: src/types/index.d.ts:123
Parameters
minutes
number
Returns
this
addMonths()
addMonths(
months
):this
Defined in: src/types/index.d.ts:124
Parameters
months
number
Returns
this
addYears()
addYears(
years
):this
Defined in: src/types/index.d.ts:125
Parameters
years
number
Returns
this
clone()
clone():
IDateChain
Defined in: src/types/index.d.ts:188
Returns
date()
Call Signature
date(
date
):this
Defined in: src/types/index.d.ts:164
Parameters
date
number
Returns
this
Call Signature
date():
number
Defined in: src/types/index.d.ts:165
Returns
number
day()
Call Signature
day(
day
):this
Defined in: src/types/index.d.ts:166
Parameters
day
number
Returns
this
Call Signature
day():
number
Defined in: src/types/index.d.ts:167
Returns
number
dayOfYear()
Call Signature
dayOfYear():
number
Defined in: src/types/index.d.ts:126
Returns
number
Call Signature
dayOfYear(
val
):this
Defined in: src/types/index.d.ts:127
Parameters
val
number
Returns
this
daysInMonth()
daysInMonth():
number
Defined in: src/types/index.d.ts:128
Returns
number
diff()
diff(
input
,unit
,asFloat
?):number
Defined in: src/types/index.d.ts:129
Parameters
input
unit
asFloat?
boolean
Returns
number
diffInDays()
diffInDays(
input
,asFloat
?):number
Defined in: src/types/index.d.ts:130
Parameters
input
asFloat?
boolean
Returns
number
diffInHours()
diffInHours(
input
,asFloat
?):number
Defined in: src/types/index.d.ts:131
Parameters
input
asFloat?
boolean
Returns
number
diffInMilliseconds()
diffInMilliseconds(
input
,asFloat
?):number
Defined in: src/types/index.d.ts:132
Parameters
input
asFloat?
boolean
Returns
number
diffInMinutes()
diffInMinutes(
input
,asFloat
?):number
Defined in: src/types/index.d.ts:133
Parameters
input
asFloat?
boolean
Returns
number
diffInMonths()
diffInMonths(
input
,asFloat
?):number
Defined in: src/types/index.d.ts:134
Parameters
input
asFloat?
boolean
Returns
number
diffInSeconds()
diffInSeconds(
input
,asFloat
?):number
Defined in: src/types/index.d.ts:135
Parameters
input
asFloat?
boolean
Returns
number
diffInYears()
diffInYears(
input
,asFloat
?):number
Defined in: src/types/index.d.ts:136
Parameters
input
asFloat?
boolean
Returns
number
endOf()
endOf(
unit
):this
Defined in: src/types/index.d.ts:137
Parameters
unit
Returns
this
format()
format(
formatString
?):string
Defined in: src/types/index.d.ts:138
Parameters
formatString?
string
Returns
string
get()
get(
unit
):number
Defined in: src/types/index.d.ts:139
Parameters
unit
Returns
number
hour()
Call Signature
hour(
hour
):this
Defined in: src/types/index.d.ts:168
Parameters
hour
number
Returns
this
Call Signature
hour():
number
Defined in: src/types/index.d.ts:169
Returns
number
hours()
Call Signature
hours(
hours
):this
Defined in: src/types/index.d.ts:179
Parameters
hours
number
Returns
this
Call Signature
hours():
number
Defined in: src/types/index.d.ts:180
Returns
number
isAfter()
isAfter(
input
,unit
):boolean
Defined in: src/types/index.d.ts:140
Parameters
input
unit
Returns
boolean
isBefore()
isBefore(
input
,unit
):boolean
Defined in: src/types/index.d.ts:141
Parameters
input
unit
Returns
boolean
isBetween()
isBetween(
from
,to
,unit
,inclusivity
?):boolean
Defined in: src/types/index.d.ts:142
Parameters
from
to
unit
inclusivity?
string
Returns
boolean
isLeapYear()
isLeapYear():
boolean
Defined in: src/types/index.d.ts:143
Returns
boolean
isSame()
isSame(
input
,unit
):boolean
Defined in: src/types/index.d.ts:144
Parameters
input
unit
Returns
boolean
isSameOrAfter()
isSameOrAfter(
input
,unit
):boolean
Defined in: src/types/index.d.ts:145
Parameters
input
unit
Returns
boolean
isSameOrBefore()
isSameOrBefore(
input
,unit
):boolean
Defined in: src/types/index.d.ts:146
Parameters
input
unit
Returns
boolean
isValid()
isValid():
boolean
Defined in: src/types/index.d.ts:147
Returns
boolean
millisecond()
Call Signature
millisecond(
millisecond
):this
Defined in: src/types/index.d.ts:174
Parameters
millisecond
number
Returns
this
Call Signature
millisecond():
number
Defined in: src/types/index.d.ts:175
Returns
number
milliseconds()
Call Signature
milliseconds(
milliseconds
):this
Defined in: src/types/index.d.ts:185
Parameters
milliseconds
number
Returns
this
Call Signature
milliseconds():
number
Defined in: src/types/index.d.ts:186
Returns
number
minute()
Call Signature
minute(
minute
):this
Defined in: src/types/index.d.ts:170
Parameters
minute
number
Returns
this
Call Signature
minute():
number
Defined in: src/types/index.d.ts:171
Returns
number
minutes()
Call Signature
minutes(
minutes
):this
Defined in: src/types/index.d.ts:181
Parameters
minutes
number
Returns
this
Call Signature
minutes():
number
Defined in: src/types/index.d.ts:182
Returns
number
month()
Call Signature
month(
month
):this
Defined in: src/types/index.d.ts:162
Parameters
month
number
Returns
this
Call Signature
month():
number
Defined in: src/types/index.d.ts:163
Returns
number
second()
Call Signature
second(
second
):this
Defined in: src/types/index.d.ts:172
Parameters
second
number
Returns
this
Call Signature
second():
number
Defined in: src/types/index.d.ts:173
Returns
number
seconds()
Call Signature
seconds(
seconds
):this
Defined in: src/types/index.d.ts:183
Parameters
seconds
number
Returns
this
Call Signature
seconds():
number
Defined in: src/types/index.d.ts:184
Returns
number
set()
set(
unit
,val
):this
Defined in: src/types/index.d.ts:148
Parameters
unit
val
number
Returns
this
startOf()
startOf(
unit
):this
Defined in: src/types/index.d.ts:149
Parameters
unit
Returns
this
subDays()
subDays(
days
):this
Defined in: src/types/index.d.ts:150
Parameters
days
number
Returns
this
subHours()
subHours(
hours
):this
Defined in: src/types/index.d.ts:151
Parameters
hours
number
Returns
this
subMilliseconds()
subMilliseconds(
time
):this
Defined in: src/types/index.d.ts:152
Parameters
time
number
Returns
this
subMinutes()
subMinutes(
minutes
):this
Defined in: src/types/index.d.ts:153
Parameters
minutes
number
Returns
this
subMonths()
subMonths(
months
):this
Defined in: src/types/index.d.ts:154
Parameters
months
number
Returns
this
subSeconds()
subSeconds(
seconds
):this
Defined in: src/types/index.d.ts:155
Parameters
seconds
number
Returns
this
subtract()
Call Signature
subtract(
input
):this
Defined in: src/types/index.d.ts:156
Parameters
input
number
| DateAddingObject
Returns
this
Call Signature
subtract(
num
,unit
):this
Defined in: src/types/index.d.ts:157
Parameters
num
number
unit
Returns
this
subYears()
subYears(
years
):this
Defined in: src/types/index.d.ts:158
Parameters
years
number
Returns
this
time()
Call Signature
time(
time
):this
Defined in: src/types/index.d.ts:176
Parameters
time
number
Returns
this
Call Signature
time():
number
Defined in: src/types/index.d.ts:177
Returns
number
toArray()
toArray():
number
[]
Defined in: src/types/index.d.ts:189
Returns
number
[]
toDate()
toDate():
Date
Defined in: src/types/index.d.ts:190
Returns
Date
toISOString()
toISOString():
string
Defined in: src/types/index.d.ts:191
Returns
string
toJSON()
toJSON():
string
Defined in: src/types/index.d.ts:192
Returns
string
toString()
toString():
string
Defined in: src/types/index.d.ts:193
Returns
string
valueOf()
valueOf():
number
Defined in: src/types/index.d.ts:194
Returns
number
year()
Call Signature
year(
year
):this
Defined in: src/types/index.d.ts:160
Parameters
year
number
Returns
this
Call Signature
year():
number
Defined in: src/types/index.d.ts:161
Returns
number
InnerDateParsingObject
Defined in: src/types/index.d.ts:28
Properties
date?
optional
date:number
Defined in: src/types/index.d.ts:31
hour?
optional
hour:number
Defined in: src/types/index.d.ts:32
millisecond?
optional
millisecond:number
Defined in: src/types/index.d.ts:35
minute?
optional
minute:number
Defined in: src/types/index.d.ts:33
month?
optional
month:number
Defined in: src/types/index.d.ts:30
second?
optional
second:number
Defined in: src/types/index.d.ts:34
utcOffset?
optional
utcOffset:number
Defined in: src/types/index.d.ts:36
year?
optional
year:number
Defined in: src/types/index.d.ts:29
InnerUnits
Defined in: src/types/index.d.ts:55
Properties
DATE
DATE:
"date"
Defined in: src/types/index.d.ts:74
Date unit (日单位)
DAY
DAY:
"day"
Defined in: src/types/index.d.ts:79
Day unit (日单位)
HOUR
HOUR:
"hour"
Defined in: src/types/index.d.ts:84
Hour unit (时单位)
MILLISECOND
MILLISECOND:
"millisecond"
Defined in: src/types/index.d.ts:99
Millisecond unit (毫秒单位)
MINUTE
MINUTE:
"minute"
Defined in: src/types/index.d.ts:89
Minute unit (分单位)
MONTH
MONTH:
"month"
Defined in: src/types/index.d.ts:69
Month unit (月单位)
SECOND
SECOND:
"second"
Defined in: src/types/index.d.ts:94
Second unit (秒单位)
TIME
TIME:
"time"
Defined in: src/types/index.d.ts:59
Time unit (时间单位)
UTC_OFFSET
UTC_OFFSET:
"utcOffset"
Defined in: src/types/index.d.ts:104
UTC offset unit (时区单位)
YEAR
YEAR:
"year"
Defined in: src/types/index.d.ts:64
Year unit (年单位)
Type Aliases
ChainInput
ChainInput =
DateInput
|IDateChain
Defined in: src/types/index.d.ts:115
DateInput
DateInput =
string
|number
|Date
|number
[] |DateParsingObject
Defined in: src/types/index.d.ts:47
Date input type 日期输入类型
InnerUnit
InnerUnit =
"year"
|"month"
|"date"
|"day"
|"hour"
|"minute"
|"second"
|"millisecond"
Defined in: src/types/index.d.ts:53
Internal date unit 内部日期单位
Unit
Unit =
"Y"
|"y"
|"M"
|"D"
|"d"
|"h"
|"m"
|"s"
|"ms"
|InnerUnit
|"years"
|"months"
|"dates"
|"days"
|"hours"
|"minutes"
|"seconds"
|"milliseconds"
Defined in: src/types/index.d.ts:111
Date unit 日期单位