From 795015f05939fa3925737c1418d01e357b1133e0 Mon Sep 17 00:00:00 2001 From: Richard Janssen Date: Fri, 1 Mar 2024 19:06:26 +0100 Subject: [PATCH] Add rotterdam icon, change time pipe --- src/app/core/pipes/pct-time.pipe.ts | 9 +++++++-- src/app/core/types/highlight.type.ts | 3 ++- .../point-highlight-summary.component.html | 1 + src/assets/icons/rotterdam.svg | 7 +++++++ 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 src/assets/icons/rotterdam.svg diff --git a/src/app/core/pipes/pct-time.pipe.ts b/src/app/core/pipes/pct-time.pipe.ts index 5a6074d..cb7aa4c 100644 --- a/src/app/core/pipes/pct-time.pipe.ts +++ b/src/app/core/pipes/pct-time.pipe.ts @@ -12,9 +12,14 @@ export class PctTimePipe implements PipeTransform { transform(date: Date): string { const pipe = new DatePipe('en-US'); if (new Date(date).valueOf() > this._constants.pctStartDate.valueOf()) { - // Has started hike + // Has started hike, Pacific Daylight Saving Time return `${pipe.transform(date, 'HH:mm', 'PDT')} PDT`; } - return `${pipe.transform(date, 'HH:mm', 'CEST')} CEST`; + // Central European Daylight saving Time + if (new Date(date).valueOf() > new Date(2024, 2, 30).valueOf()) { + return `${pipe.transform(date, 'HH:mm', '+0200')} CEST`; + } + // Central European Time + return `${pipe.transform(date, 'HH:mm', '+0100')} CET`; } } diff --git a/src/app/core/types/highlight.type.ts b/src/app/core/types/highlight.type.ts index 345d53b..40a5b20 100644 --- a/src/app/core/types/highlight.type.ts +++ b/src/app/core/types/highlight.type.ts @@ -57,5 +57,6 @@ export enum PointHighlightType { twentyFiveHundred = 'twentyFiveHundred', threeThousand = 'threeThousand', thirtyFiveHundred = 'thirtyFiveHundred', - fourThousand = 'fourThousand' + fourThousand = 'fourThousand', + rotterdam = 'rotterdam' } diff --git a/src/app/pages/hike/highlights-chain/point-highlight/point-highlight-summary/point-highlight-summary.component.html b/src/app/pages/hike/highlights-chain/point-highlight/point-highlight-summary/point-highlight-summary.component.html index 136be12..2144431 100644 --- a/src/app/pages/hike/highlights-chain/point-highlight/point-highlight-summary/point-highlight-summary.component.html +++ b/src/app/pages/hike/highlights-chain/point-highlight/point-highlight-summary/point-highlight-summary.component.html @@ -24,6 +24,7 @@ + diff --git a/src/assets/icons/rotterdam.svg b/src/assets/icons/rotterdam.svg new file mode 100644 index 0000000..3bc8129 --- /dev/null +++ b/src/assets/icons/rotterdam.svg @@ -0,0 +1,7 @@ + + +