Skip to content

Commit

Permalink
Merge pull request #174 from richardjanssen/develop
Browse files Browse the repository at this point in the history
Add rotterdam icon, change time pipe
  • Loading branch information
richardjanssen authored Mar 1, 2024
2 parents 657bece + 795015f commit fb10922
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/app/core/pipes/pct-time.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
}
3 changes: 2 additions & 1 deletion src/app/core/types/highlight.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ export enum PointHighlightType {
twentyFiveHundred = 'twentyFiveHundred',
threeThousand = 'threeThousand',
thirtyFiveHundred = 'thirtyFiveHundred',
fourThousand = 'fourThousand'
fourThousand = 'fourThousand',
rotterdam = 'rotterdam'
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<icon *ngSwitchCase="pointHighlightType.threeThousand" name="party"></icon>
<icon *ngSwitchCase="pointHighlightType.thirtyFiveHundred" name="party"></icon>
<icon *ngSwitchCase="pointHighlightType.fourThousand" name="party"></icon>
<icon *ngSwitchCase="pointHighlightType.rotterdam" name="rotterdam"></icon>
<icon *ngSwitchDefault name="icon-dots"></icon>
</ng-container>
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/assets/icons/rotterdam.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fb10922

Please sign in to comment.