mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-04 16:04:45 +08:00
25 lines
378 B
TypeScript
25 lines
378 B
TypeScript
/// <reference path="fromnow.d.ts" />
|
|
|
|
import fromnow = require( 'fromnow' );
|
|
|
|
function dateOnly() {
|
|
fromnow( '2015-12-31' );
|
|
}
|
|
|
|
function maxChunks() {
|
|
fromnow( '2015-12-31', {
|
|
maxChunks: 12
|
|
});
|
|
}
|
|
|
|
function useAgo() {
|
|
fromnow( '2015-12-31', {
|
|
useAgo: true
|
|
});
|
|
}
|
|
|
|
function useAnd() {
|
|
fromnow( '2015-12-31', {
|
|
useAnd: true
|
|
});
|
|
} |