From: Tim Wood Date: Mon, 11 Jun 2012 21:14:49 +0000 (-0700) Subject: Grr, more whitespace…not sure how those tabs made it in… X-Git-Tag: 1.7.0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d456dadd3d5e802942436eb5b4e78f684e20656;p=thirdparty%2Fmoment.git Grr, more whitespace…not sure how those tabs made it in… #296 --- diff --git a/test/moment/sod_eod.js b/test/moment/sod_eod.js index 17dbd5980..fd3a85688 100644 --- a/test/moment/sod_eod.js +++ b/test/moment/sod_eod.js @@ -39,11 +39,11 @@ exports.eod_sod = { }, "start of year" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('year'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('years'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('years'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 0, "strip out the month"); test.equal(m.date(), 1, "strip out the day"); @@ -55,11 +55,11 @@ exports.eod_sod = { }, "end of year" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('year'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('years'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('years'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 11, "set the month"); test.equal(m.date(), 31, "set the day"); @@ -71,11 +71,11 @@ exports.eod_sod = { }, "start of month" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('month'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('months'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('months'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 1, "strip out the day"); @@ -87,11 +87,11 @@ exports.eod_sod = { }, "end of month" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('month'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('months'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('months'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 28, "set the day"); @@ -103,11 +103,11 @@ exports.eod_sod = { }, "start of day" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('day'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('days'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('days'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day"); @@ -119,11 +119,11 @@ exports.eod_sod = { }, "end of day" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('day'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('days'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('days'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day"); @@ -135,11 +135,11 @@ exports.eod_sod = { }, "start of hour" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hour'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hours'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hours'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day"); @@ -151,11 +151,11 @@ exports.eod_sod = { }, "end of hour" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hour'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hours'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hours'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day"); @@ -167,11 +167,11 @@ exports.eod_sod = { }, "start of minute" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minute'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minutes'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minutes'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day"); @@ -183,11 +183,11 @@ exports.eod_sod = { }, "end of minute" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minute'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minutes'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minutes'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day"); @@ -199,11 +199,11 @@ exports.eod_sod = { }, "start of second" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('second'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('seconds'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('seconds'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day"); @@ -215,11 +215,11 @@ exports.eod_sod = { }, "end of second" : function(test) { - test.expect(8); + test.expect(8); var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('second'); - var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('seconds'); - test.equal(+m, +ms, "Plural or singular should work"); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('seconds'); + test.equal(+m, +ms, "Plural or singular should work"); test.equal(m.year(), 2011, "keep the year"); test.equal(m.month(), 1, "keep the month"); test.equal(m.date(), 2, "keep the day");