From 63d3bf1cfadb89a470e10d28637596144ed3c41f Mon Sep 17 00:00:00 2001 From: SutuSebastian Date: Fri, 5 Jan 2024 09:47:34 +0200 Subject: [PATCH] fix: make footer year dynamic; manually update `license.mdx` year; fix `Datepicker` manual year tests --- app/docs/[[...slug]]/page.tsx | 2 +- components/homepage/main-footer.tsx | 2 +- content/docs/getting-started/license.mdx | 2 +- src/components/Datepicker/helpers.spec.tsx | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/docs/[[...slug]]/page.tsx b/app/docs/[[...slug]]/page.tsx index a3bbff561..e438de167 100644 --- a/app/docs/[[...slug]]/page.tsx +++ b/app/docs/[[...slug]]/page.tsx @@ -238,7 +238,7 @@ function DocFooter() { diff --git a/components/homepage/main-footer.tsx b/components/homepage/main-footer.tsx index be5ca1909..a5f67c725 100644 --- a/components/homepage/main-footer.tsx +++ b/components/homepage/main-footer.tsx @@ -91,7 +91,7 @@ export const MainFooter: FC = () => { diff --git a/content/docs/getting-started/license.mdx b/content/docs/getting-started/license.mdx index 2e5c919c9..f44bc8bd4 100644 --- a/content/docs/getting-started/license.mdx +++ b/content/docs/getting-started/license.mdx @@ -5,7 +5,7 @@ description: Learn more about the open-source licensing rights of the Flowbite R ## MIT License -Copyright © 2023 Bergside Inc. +Copyright © 2024 Bergside Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/components/Datepicker/helpers.spec.tsx b/src/components/Datepicker/helpers.spec.tsx index 9d4793ac0..0a76d7c21 100644 --- a/src/components/Datepicker/helpers.spec.tsx +++ b/src/components/Datepicker/helpers.spec.tsx @@ -134,20 +134,20 @@ describe('addYears', () => { it('returns a new date by adding the specified number of years', () => { const date = new Date(2023, 0, 1); // January 1st, 2023 const newDate = addYears(date, 5); - expect(newDate.getFullYear()).toBe(2028); + expect(newDate.getFullYear()).toBe(date.getFullYear() + 5); }); it('returns a new date by subtracting the specified number of years', () => { const date = new Date(2023, 0, 1); // January 1st, 2023 const newDate = addYears(date, -2); - expect(newDate.getFullYear()).toBe(2021); + expect(newDate.getFullYear()).toBe(date.getFullYear() - 2); }); it('does not modify the original date', () => { const date = new Date(2023, 0, 1); // January 1st, 2023 const newDate = addYears(date, 5); expect(date.getFullYear()).toBe(2023); - expect(newDate.getFullYear()).toBe(2028); + expect(newDate.getFullYear()).toBe(date.getFullYear() + 5); }); });