UNPKG
intl-relativeformat
Version:
latest (6.4.3)
6.4.3
6.4.2
6.4.1
6.4.0
6.3.1
6.3.0
6.2.2
6.2.1
6.2.0
6.1.1
6.1.0
6.0.0
5.0.0
3.1.0
3.0.1
2.2.0
2.1.3
2.1.1
2.1.0
2.0.0
1.3.0
1.2.0
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-rc-1
1.0.0-beta-2
1.0.0-beta-1
Formats JavaScript dates to relative time strings.
github.com/formatjs/formatjs
formatjs/formatjs
intl-relativeformat
/
dist
/
diff.d.ts
3 lines
(2 loc)
•
146 B
TypeScript
View Raw
1
2
3
import
{
SUPPORTED_FIELD
}
from
'./types'
;
export
default
function
diff
(
from
:
Date
|
number
,
to
:
Date
|
number
):
Record
<
SUPPORTED_FIELD
,
number
>;