Files
DefinitelyTyped/types/fromnow/fromnow-tests.ts
2017-03-24 14:27:52 -07:00

30 lines
400 B
TypeScript

import fromnow = require( 'fromnow' );
function dateOnly() {
fromnow( '2015-12-31' );
}
function dateObjectOnly() {
fromnow( new Date() );
}
function maxChunks() {
fromnow( '2015-12-31', {
maxChunks: 12
});
}
function useAgo() {
fromnow( '2015-12-31', {
useAgo: true
});
}
function useAnd() {
fromnow( '2015-12-31', {
useAnd: true
});
}