DefinitelyTyped/types/fromnow/fromnow-tests.ts
2018-09-21 14:41:34 -07:00

36 lines
449 B
TypeScript

import fromnow = require('fromnow');
function dateOnly() {
fromnow('2015-12-31');
}
function dateObjectOnly() {
fromnow(new Date());
}
function max() {
fromnow('2015-12-31', {
max: 12
});
}
function suffix() {
fromnow('2015-12-31', {
suffix: true
});
}
function and() {
fromnow('2015-12-31', {
and: true
});
}
function zero() {
fromnow('2015-12-31', {
zero: true
});
}