moment: Tests for 2.9.0 methods

This commit is contained in:
Rodney Lorrimar
2015-06-02 15:33:07 +08:00
parent ab71290650
commit dbbc90296b
2 changed files with 16 additions and 0 deletions
+7
View File
@@ -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();
+9
View File
@@ -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');