From 0c459227a88b3aa241d2f76f1ad11e0a2fb4e8a7 Mon Sep 17 00:00:00 2001 From: dominikiwanekhyland <141320833+dominikiwanekhyland@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:11:52 +0100 Subject: [PATCH] [ACS-8223] - Remove MomentDateTimePipe (#10602) [ACS-8222] - Remove MomentDatePipe --- lib/core/src/lib/pipes/moment-date.pipe.ts | 33 ------------------- .../src/lib/pipes/moment-datetime.pipe.ts | 32 ------------------ lib/core/src/lib/pipes/pipe.module.ts | 4 --- lib/core/src/lib/pipes/public-api.ts | 2 -- 4 files changed, 71 deletions(-) delete mode 100644 lib/core/src/lib/pipes/moment-date.pipe.ts delete mode 100644 lib/core/src/lib/pipes/moment-datetime.pipe.ts diff --git a/lib/core/src/lib/pipes/moment-date.pipe.ts b/lib/core/src/lib/pipes/moment-date.pipe.ts deleted file mode 100644 index 57a1bbd015..0000000000 --- a/lib/core/src/lib/pipes/moment-date.pipe.ts +++ /dev/null @@ -1,33 +0,0 @@ -/*! - * @license - * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Pipe, PipeTransform } from '@angular/core'; - -declare let moment: any; - -/** - * @deprecated this pipe is deprecated and should no longer be used - */ -@Pipe({ - name: 'adfMomentDate', - standalone: true -}) -export class MomentDatePipe implements PipeTransform { - transform(value: any, dateFormat: string): any { - return moment(value, dateFormat); - } -} diff --git a/lib/core/src/lib/pipes/moment-datetime.pipe.ts b/lib/core/src/lib/pipes/moment-datetime.pipe.ts deleted file mode 100644 index bcb20904a7..0000000000 --- a/lib/core/src/lib/pipes/moment-datetime.pipe.ts +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * @license - * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Pipe, PipeTransform } from '@angular/core'; -declare let moment: any; - -/** - * @deprecated this pipe is deprecated and should no longer be used - */ -@Pipe({ - name: 'adfMomentDateTime', - standalone: true -}) -export class MomentDateTimePipe implements PipeTransform { - transform(value: any, dateFormat: string): any { - return moment(value, dateFormat).add(moment(value, dateFormat).utcOffset(), 'minutes'); - } -} diff --git a/lib/core/src/lib/pipes/pipe.module.ts b/lib/core/src/lib/pipes/pipe.module.ts index c38977bab6..b2b9999f5e 100644 --- a/lib/core/src/lib/pipes/pipe.module.ts +++ b/lib/core/src/lib/pipes/pipe.module.ts @@ -27,8 +27,6 @@ import { FileTypePipe } from './file-type.pipe'; import { MultiValuePipe } from './multi-value.pipe'; import { LocalizedDatePipe } from './localized-date.pipe'; import { DecimalNumberPipe } from './decimal-number.pipe'; -import { MomentDatePipe } from './moment-date.pipe'; -import { MomentDateTimePipe } from './moment-datetime.pipe'; import { DateTimePipe } from './date-time.pipe'; import { TruncatePipe } from './truncate.pipe'; @@ -42,8 +40,6 @@ export const CORE_PIPES = [ FileTypePipe, MultiValuePipe, DecimalNumberPipe, - MomentDatePipe, - MomentDateTimePipe, DateTimePipe, InitialUsernamePipe, TruncatePipe diff --git a/lib/core/src/lib/pipes/public-api.ts b/lib/core/src/lib/pipes/public-api.ts index f2e99d35d8..f7b56b7a93 100644 --- a/lib/core/src/lib/pipes/public-api.ts +++ b/lib/core/src/lib/pipes/public-api.ts @@ -26,7 +26,5 @@ export * from './text-highlight.pipe'; export * from './time-ago.pipe'; export * from './user-initial.pipe'; export * from './pipe.module'; -export * from './moment-date.pipe'; -export * from './moment-datetime.pipe'; export * from './date-time.pipe'; export * from './truncate.pipe';