mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
moment: Tests for 2.9.0 methods
This commit is contained in:
@@ -196,10 +196,17 @@ moment.isMoment();
|
||||
moment.isMoment(new Date());
|
||||
moment.isMoment(moment());
|
||||
|
||||
moment.isDate(new Date());
|
||||
moment.isDate(/regexp/);
|
||||
|
||||
moment.isDuration();
|
||||
moment.isDuration(new Date());
|
||||
moment.isDuration(moment.duration());
|
||||
|
||||
moment().isBetween(moment(), moment());
|
||||
moment().isBetween(new Date(), new Date());
|
||||
moment().isBetween([1,1,2000], [1,1,2001], "year");
|
||||
|
||||
moment.localeData('fr');
|
||||
moment(1316116057189).fromNow();
|
||||
|
||||
|
||||
@@ -196,10 +196,17 @@ moment.isMoment();
|
||||
moment.isMoment(new Date());
|
||||
moment.isMoment(moment());
|
||||
|
||||
moment.isDate(new Date());
|
||||
moment.isDate(/regexp/);
|
||||
|
||||
moment.isDuration();
|
||||
moment.isDuration(new Date());
|
||||
moment.isDuration(moment.duration());
|
||||
|
||||
moment().isBetween(moment(), moment());
|
||||
moment().isBetween(new Date(), new Date());
|
||||
moment().isBetween([1,1,2000], [1,1,2001], "year");
|
||||
|
||||
moment.localeData('fr');
|
||||
moment(1316116057189).fromNow();
|
||||
|
||||
@@ -228,6 +235,8 @@ moment.duration(500).seconds();
|
||||
moment.duration(500).asSeconds();
|
||||
moment.duration().minutes();
|
||||
moment.duration().asMinutes();
|
||||
moment.duration().toISOString();
|
||||
moment.duration().toJSON();
|
||||
|
||||
var adur = moment.duration(3, 'd');
|
||||
var bdur = moment.duration(2, 'd');
|
||||
|
||||
Reference in New Issue
Block a user