Skip to content

Commit

Permalink
ARPA-968 removed invalid timezone default value (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
VILLAN3LL3 authored Dec 27, 2023
1 parent e223435 commit 9a65dee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/@arpa/pipes/localized-date/localized-date.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ import { TranslateService } from '@ngx-translate/core';
*/
@Pipe({
name: 'localizedDate',
pure: false
pure: false,
})
export class LocalizedDatePipe implements PipeTransform {

constructor(private translateService: TranslateService, private datePipe: DatePipe) {}

transform(value: any, pattern: string = 'mediumDate', timezone: string = 'de'): any {
transform(value: any, pattern: string = 'mediumDate', timezone?: string): any {
try {
return this.datePipe.transform(value, pattern, timezone, this.translateService.currentLang);
} catch (e) {
return this.datePipe.transform(value, pattern, timezone, 'en-GB');
}
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@
<span class="no-prediction">{{ 'appointments.NO_PREDICTION' | translate }}</span>
</div>
</ng-template>
```

0 comments on commit 9a65dee

Please sign in to comment.