diff --git a/src/Squidex/app/framework/angular/date-time.pipes.spec.ts b/src/Squidex/app/framework/angular/date-time.pipes.spec.ts index 52169dd55..c0b3b6b58 100644 --- a/src/Squidex/app/framework/angular/date-time.pipes.spec.ts +++ b/src/Squidex/app/framework/angular/date-time.pipes.spec.ts @@ -25,7 +25,7 @@ describe('DurationPipe', () => { const pipe = new DurationPipe(); - const actual = pipe.transform(duration, []); + const actual = pipe.transform(duration); const expected = '312:10h'; expect(actual).toBe(expected); @@ -36,7 +36,7 @@ describe('DayPipe', () => { it('should format to day numbers', () => { const pipe = new DayPipe(); - const actual = pipe.transform(dateTime, []); + const actual = pipe.transform(dateTime); const expected = '03'; expect(actual).toBe(expected); @@ -47,7 +47,7 @@ describe('MonthPipe', () => { it('should format to long month name', () => { const pipe = new MonthPipe(); - const actual = pipe.transform(dateTime, []); + const actual = pipe.transform(dateTime); const expected = 'October'; expect(actual).toBe(expected); @@ -58,7 +58,7 @@ describe('FromNowPipe', () => { it('should format to from now string', () => { const pipe = new FromNowPipe(); - const actual = pipe.transform(DateTime.now().addMinutes(-4), []); + const actual = pipe.transform(DateTime.now().addMinutes(-4)); const expected = '4 minutes ago'; expect(actual).toBe(expected); @@ -69,7 +69,7 @@ describe('DayOfWeekPipe', () => { it('should format to short week of day string', () => { const pipe = new DayOfWeekPipe(); - const actual = pipe.transform(dateTime, []); + const actual = pipe.transform(dateTime); const expected = 'Th'; expect(actual).toBe(expected); @@ -80,7 +80,7 @@ describe('ShortDatePipe', () => { it('should format to two digit day number and short month name', () => { const pipe = new ShortDatePipe(); - const actual = pipe.transform(dateTime, []); + const actual = pipe.transform(dateTime); const expected = '03.Oct'; expect(actual).toBe(expected); @@ -91,7 +91,7 @@ describe('ShortTimePipe', () => { it('should format to short time string', () => { const pipe = new ShortTimePipe(); - const actual = pipe.transform(dateTime, []); + const actual = pipe.transform(dateTime); const expected = '12:13'; expect(actual).toBe(expected); diff --git a/src/Squidex/app/framework/angular/money.pipe.spec.ts b/src/Squidex/app/framework/angular/money.pipe.spec.ts index a0b43c168..e0b1a28c1 100644 --- a/src/Squidex/app/framework/angular/money.pipe.spec.ts +++ b/src/Squidex/app/framework/angular/money.pipe.spec.ts @@ -13,7 +13,7 @@ describe('MoneyPipe', () => { it('should format money values with symbol after number', () => { const pipe = new MoneyPipe(new CurrencyConfig('EUR', '€'), new DecimalSeparatorConfig(',')); - const actual = pipe.transform(123.49, []); + const actual = pipe.transform(123.49); const expected = '123,49 €'; expect(actual).toBe(expected); @@ -22,7 +22,7 @@ describe('MoneyPipe', () => { it('should format money values with symbol after number and one decimal', () => { const pipe = new MoneyPipe(new CurrencyConfig('EUR', '€'), new DecimalSeparatorConfig(',')); - const actual = pipe.transform(123.4, []); + const actual = pipe.transform(123.4); const expected = '123,40 €'; expect(actual).toBe(expected); @@ -31,7 +31,7 @@ describe('MoneyPipe', () => { it('should format money values with symbol before number', () => { const pipe = new MoneyPipe(new CurrencyConfig('EUR', '€', false), new DecimalSeparatorConfig(',')); - const actual = pipe.transform(123.49, []); + const actual = pipe.transform(123.49); const expected = '€ 123,49'; expect(actual).toBe(expected); @@ -40,7 +40,7 @@ describe('MoneyPipe', () => { it('should format money values with symbol before number and one decimal', () => { const pipe = new MoneyPipe(new CurrencyConfig('EUR', '€', false), new DecimalSeparatorConfig(',')); - const actual = pipe.transform(123.4, []); + const actual = pipe.transform(123.4); const expected = '€ 123,40'; expect(actual).toBe(expected); diff --git a/src/Squidex/app/framework/utils/date-time.spec.ts b/src/Squidex/app/framework/utils/date-time.spec.ts index 7b8e49acf..c79345186 100644 --- a/src/Squidex/app/framework/utils/date-time.spec.ts +++ b/src/Squidex/app/framework/utils/date-time.spec.ts @@ -81,12 +81,6 @@ describe('DateTime', () => { expect(actual).toEqual(expected); }); - it('should convert to local time', () => { - const value = DateTime.parseISO_UTC('2013-10-16T12:13:14'); - - expect(value.toLocal().ne(value)).toBeTruthy(); - }); - it('should print to formatted string', () => { const value = DateTime.parseISO_UTC('2013-10-16T12:13:14'); const actual = value.toStringFormat('hh:mm'); diff --git a/src/Squidex/app/framework/utils/date-time.ts b/src/Squidex/app/framework/utils/date-time.ts index d3e78485b..8fc266420 100644 --- a/src/Squidex/app/framework/utils/date-time.ts +++ b/src/Squidex/app/framework/utils/date-time.ts @@ -221,10 +221,6 @@ export class DateTime { return new DateTime(clone); } - public toLocal(): DateTime { - return new DateTime(new Date(this.value.getTime() - this.value.getTimezoneOffset() * 60 * 1000)); - } - public toUTCString(): string { return this.value.toUTCString(); } diff --git a/src/Squidex/app/theme/_mixins.scss b/src/Squidex/app/theme/_mixins.scss index 9737bf2db..3e3cf3314 100644 --- a/src/Squidex/app/theme/_mixins.scss +++ b/src/Squidex/app/theme/_mixins.scss @@ -94,7 +94,7 @@ @mixin circle($size) { @include border-radius($size * .5); - width: $size; + width: $size; height: $size; }