From dde8ea1a3f679b70567db0e22199e8de0026e4be Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Wed, 24 Sep 2014 12:22:32 +0200 Subject: [PATCH] Strip Whitespace --- moment/moment-external-tests.ts | 58 ++++++++++++++++----------------- moment/moment-tests.ts | 58 ++++++++++++++++----------------- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/moment/moment-external-tests.ts b/moment/moment-external-tests.ts index 5f2e23e46..14376f2b4 100644 --- a/moment/moment-external-tests.ts +++ b/moment/moment-external-tests.ts @@ -18,7 +18,7 @@ var now = moment(); var day7 = moment([2010, 1, 14, 15, 25, 50, 125]); var day8 = moment([2010]); var day9 = moment([2010, 6]); -var day10 = moment([2010, 6, 10]); +var day10 = moment([2010, 6, 10]); var array = [2010, 1, 14, 15, 25, 50, 125]; var day11 = moment(Date.UTC.apply({}, array)); var day12 = moment.unix(1318781876); @@ -62,8 +62,8 @@ a.hours(); a.local(); a.hours(); -moment("2011-10-10", "YYYY-MM-DD").isValid(); -moment("2011-10-50", "YYYY-MM-DD").isValid(); +moment("2011-10-10", "YYYY-MM-DD").isValid(); +moment("2011-10-50", "YYYY-MM-DD").isValid(); moment("2011-10-10T10:20:90").isValid(); moment([2011, 0, 1]).isValid(); moment([2011, 0, 50]).isValid(); @@ -74,16 +74,16 @@ moment().add('days', 7).subtract('months', 1).year(2009).hours(0).minutes(0).sec moment().add('days', 7); moment().add('days', 7).add('months', 1); moment().add({days:7,months:1}); -moment().add('milliseconds', 1000000); +moment().add('milliseconds', 1000000); moment().add('days', 360); -moment([2010, 0, 31]); +moment([2010, 0, 31]); moment([2010, 0, 31]).add('months', 1); var m = moment(new Date(2011, 2, 12, 5, 0, 0)); -m.hours(); +m.hours(); m.add('days', 1).hours(); -var m2 = moment(new Date(2011, 2, 12, 5, 0, 0)); +var m2 = moment(new Date(2011, 2, 12, 5, 0, 0)); m2.hours(); -m2.add('hours', 24).hours(); +m2.add('hours', 24).hours(); var duration = moment.duration({'days': 1}); moment([2012, 0, 31]).add(duration); @@ -99,14 +99,14 @@ moment().subtract('days', 7); moment().seconds(30); moment().minutes(30); -moment().hours(12); +moment().hours(12); moment().date(5); moment().day(5); moment().day("Sunday"); moment().month(5); moment().month("January"); moment().year(1984); -moment().startOf('year'); +moment().startOf('year'); moment().month(0).date(1).hours(0).minutes(0).seconds(0).milliseconds(0); moment().startOf('hour'); moment().minutes(0).seconds(0).milliseconds(0); @@ -127,10 +127,10 @@ moment().isoWeek(45); moment().isoWeeks(); moment().isoWeeks(45); -var getMilliseconds: number = moment().milliseconds(); -var getSeconds: number = moment().seconds(); -var getMinutes: number = moment().minutes(); -var getHours: number = moment().hours(); +var getMilliseconds: number = moment().milliseconds(); +var getSeconds: number = moment().seconds(); +var getMinutes: number = moment().minutes(); +var getHours: number = moment().hours(); var getDate: number = moment().date(); var getDay: number = moment().day(); var getMonth: number = moment().month(); @@ -145,11 +145,11 @@ a3.utc(); a3.hours(); var a4 = moment([2010, 1, 14, 15, 25, 50, 125]); -a4.format("dddd, MMMM Do YYYY, h:mm:ss a"); +a4.format("dddd, MMMM Do YYYY, h:mm:ss a"); a4.format("ddd, hA"); moment().format('\\L'); -moment().format('[today] DDDD'); +moment().format('[today] DDDD'); var a5 = moment([2007, 0, 29]); var b5 = moment([2007, 0, 28]); @@ -158,8 +158,8 @@ a5.from(b5); var a6 = moment([2007, 0, 29]); var b6 = moment([2007, 0, 28]); a6.from(b6); -a6.from([2007, 0, 28]); -a6.from(new Date(2007, 0, 28)); +a6.from([2007, 0, 28]); +a6.from(new Date(2007, 0, 28)); a6.from("1-28-2007"); var a7 = moment(); @@ -168,23 +168,23 @@ a7.from(b7); var start = moment([2007, 0, 5]); var end = moment([2007, 0, 10]); -start.from(end); +start.from(end); start.from(end, true); -moment([2007, 0, 29]).fromNow(); -moment([2007, 0, 29]).fromNow(); -moment([2007, 0, 29]).fromNow(true); +moment([2007, 0, 29]).fromNow(); +moment([2007, 0, 29]).fromNow(); +moment([2007, 0, 29]).fromNow(true); var a8 = moment([2007, 0, 29]); var b8 = moment([2007, 0, 28]); a8.diff(b8) ; a8.diff(b8, 'days'); -a8.diff(b8, 'years') +a8.diff(b8, 'years') a8.diff(b8, 'years', true); moment([2007, 0, 29]).toDate(); moment([2007, 1, 23]).toISOString(); -moment(1318874398806).valueOf(); +moment(1318874398806).valueOf(); moment(1318874398806).unix(); moment([2000]).isLeapYear(); moment().zone(); @@ -198,12 +198,12 @@ moment.isMoment(moment()); moment.localeData('fr'); moment(1316116057189).fromNow(); -moment.localeData('en'); +moment.localeData('en'); var globalLang = moment(); var localLang = moment(); -localLang.localeData('fr'); -localLang.format('LLLL'); -globalLang.format('LLLL'); +localLang.localeData('fr'); +localLang.format('LLLL'); +globalLang.format('LLLL'); moment.duration(100); moment.duration(2, 'seconds'); @@ -235,7 +235,7 @@ moment.locale(); moment.locale('en'); moment.locale(['en', 'fr']); -// Defining a custom language: +// Defining a custom language: moment.locale('en', { months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], diff --git a/moment/moment-tests.ts b/moment/moment-tests.ts index 4f81b5020..ab629921d 100644 --- a/moment/moment-tests.ts +++ b/moment/moment-tests.ts @@ -16,7 +16,7 @@ var now = moment(); var day7 = moment([2010, 1, 14, 15, 25, 50, 125]); var day8 = moment([2010]); var day9 = moment([2010, 6]); -var day10 = moment([2010, 6, 10]); +var day10 = moment([2010, 6, 10]); var array = [2010, 1, 14, 15, 25, 50, 125]; var day11 = moment(Date.UTC.apply({}, array)); var day12 = moment.unix(1318781876); @@ -60,8 +60,8 @@ a.hours(); a.local(); a.hours(); -moment("2011-10-10", "YYYY-MM-DD").isValid(); -moment("2011-10-50", "YYYY-MM-DD").isValid(); +moment("2011-10-10", "YYYY-MM-DD").isValid(); +moment("2011-10-50", "YYYY-MM-DD").isValid(); moment("2011-10-10T10:20:90").isValid(); moment([2011, 0, 1]).isValid(); moment([2011, 0, 50]).isValid(); @@ -72,16 +72,16 @@ moment().add('days', 7).subtract('months', 1).year(2009).hours(0).minutes(0).sec moment().add('days', 7); moment().add('days', 7).add('months', 1); moment().add({days:7,months:1}); -moment().add('milliseconds', 1000000); +moment().add('milliseconds', 1000000); moment().add('days', 360); -moment([2010, 0, 31]); +moment([2010, 0, 31]); moment([2010, 0, 31]).add('months', 1); var m = moment(new Date(2011, 2, 12, 5, 0, 0)); -m.hours(); +m.hours(); m.add('days', 1).hours(); -var m2 = moment(new Date(2011, 2, 12, 5, 0, 0)); +var m2 = moment(new Date(2011, 2, 12, 5, 0, 0)); m2.hours(); -m2.add('hours', 24).hours(); +m2.add('hours', 24).hours(); var duration = moment.duration({'days': 1}); moment([2012, 0, 31]).add(duration); @@ -97,14 +97,14 @@ moment().subtract('days', 7); moment().seconds(30); moment().minutes(30); -moment().hours(12); +moment().hours(12); moment().date(5); moment().day(5); moment().day("Sunday"); moment().month(5); moment().month("January"); moment().year(1984); -moment().startOf('year'); +moment().startOf('year'); moment().month(0).date(1).hours(0).minutes(0).seconds(0).milliseconds(0); moment().startOf('hour'); moment().minutes(0).seconds(0).milliseconds(0); @@ -125,10 +125,10 @@ moment().isoWeek(45); moment().isoWeeks(); moment().isoWeeks(45); -var getMilliseconds: number = moment().milliseconds(); -var getSeconds: number = moment().seconds(); -var getMinutes: number = moment().minutes(); -var getHours: number = moment().hours(); +var getMilliseconds: number = moment().milliseconds(); +var getSeconds: number = moment().seconds(); +var getMinutes: number = moment().minutes(); +var getHours: number = moment().hours(); var getDate: number = moment().date(); var getDay: number = moment().day(); var getMonth: number = moment().month(); @@ -143,11 +143,11 @@ a3.utc(); a3.hours(); var a4 = moment([2010, 1, 14, 15, 25, 50, 125]); -a4.format("dddd, MMMM Do YYYY, h:mm:ss a"); +a4.format("dddd, MMMM Do YYYY, h:mm:ss a"); a4.format("ddd, hA"); moment().format('\\L'); -moment().format('[today] DDDD'); +moment().format('[today] DDDD'); var a5 = moment([2007, 0, 29]); var b5 = moment([2007, 0, 28]); @@ -156,8 +156,8 @@ a5.from(b5); var a6 = moment([2007, 0, 29]); var b6 = moment([2007, 0, 28]); a6.from(b6); -a6.from([2007, 0, 28]); -a6.from(new Date(2007, 0, 28)); +a6.from([2007, 0, 28]); +a6.from(new Date(2007, 0, 28)); a6.from("1-28-2007"); var a7 = moment(); @@ -166,23 +166,23 @@ a7.from(b7); var start = moment([2007, 0, 5]); var end = moment([2007, 0, 10]); -start.from(end); +start.from(end); start.from(end, true); -moment([2007, 0, 29]).fromNow(); -moment([2007, 0, 29]).fromNow(); -moment([2007, 0, 29]).fromNow(true); +moment([2007, 0, 29]).fromNow(); +moment([2007, 0, 29]).fromNow(); +moment([2007, 0, 29]).fromNow(true); var a8 = moment([2007, 0, 29]); var b8 = moment([2007, 0, 28]); a8.diff(b8) ; a8.diff(b8, 'days'); -a8.diff(b8, 'years') +a8.diff(b8, 'years') a8.diff(b8, 'years', true); moment([2007, 0, 29]).toDate(); moment([2007, 1, 23]).toISOString(); -moment(1318874398806).valueOf(); +moment(1318874398806).valueOf(); moment(1318874398806).unix(); moment([2000]).isLeapYear(); moment().zone(); @@ -196,12 +196,12 @@ moment.isMoment(moment()); moment.localeData('fr'); moment(1316116057189).fromNow(); -moment.localeData('en'); +moment.localeData('en'); var globalLang = moment(); var localLang = moment(); -localLang.localeData('fr'); -localLang.format('LLLL'); -globalLang.format('LLLL'); +localLang.localeData('fr'); +localLang.format('LLLL'); +globalLang.format('LLLL'); moment.duration(100); moment.duration(2, 'seconds'); @@ -233,7 +233,7 @@ moment.locale(); moment.locale('en'); moment.locale(['en', 'fr']); -// Defining a custom language: +// Defining a custom language: moment.locale('en', { months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],