};
} else if (twentyFourHourMatched) {
duration = {
- y: 0,
- d: 0,
- h: ~~twentyFourHourMatched[1],
- m: ~~twentyFourHourMatched[2],
- s: 0,
- ms: 0
+ y: 0,
+ d: 0,
+ h: ~~twentyFourHourMatched[1],
+ m: ~~twentyFourHourMatched[2],
+ s: 0,
+ ms: 0
};
}
test.done();
},
- "instantiation from 24-hour time zero" : function(test) {
+ "instantiation from 24-hour time zero" : function (test) {
test.expect(6);
test.equal(moment.duration("00:00").years(), 0, "0 years");
test.equal(moment.duration("00:00").days(), 0, "0 days");
test.done();
},
- "instantiation from 24-hour time" : function(test) {
+ "instantiation from 24-hour time" : function (test) {
test.expect(6);
test.equal(moment.duration("26:45").years(), 0, "0 years");
test.equal(moment.duration("26:45").days(), 1, "0 days");