From b6666530966f741746726f5188ea125ef49cfe64 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 21 Jul 2026 10:55:31 +0200 Subject: [PATCH] Refactor isAfter() with isFuture() and isPast() --- .../components/investment-chart/investment-chart.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index dc3152f120..3aa65b9983 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -41,7 +41,7 @@ import { } from 'chart.js'; import 'chartjs-adapter-date-fns'; import { type AnnotationOptions } from 'chartjs-plugin-annotation'; -import { isAfter } from 'date-fns'; +import { isFuture } from 'date-fns'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @Component({ @@ -311,6 +311,6 @@ export class GfInvestmentChartComponent implements OnChanges, OnDestroy { return undefined; } - return isAfter(new Date(xValue), new Date()) ? aValue : undefined; + return isFuture(new Date(xValue)) ? aValue : undefined; } }