Skip to content

Commit 77f5246

Browse files
SutuSebastianSutuSebastian
andauthored
docs: update for new year (#1215)
fix: make footer year dynamic; manually update `license.mdx` year; fix `Datepicker` manual year tests Co-authored-by: SutuSebastian <[email protected]>
1 parent a1b4470 commit 77f5246

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/docs/[[...slug]]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function DocFooter() {
238238
<Footer.Copyright
239239
by="All Rights Reserved. Flowbite™ is a registered trademark."
240240
href="/"
241-
year={2023}
241+
year={new Date().getFullYear()}
242242
className="text-base"
243243
/>
244244
</div>

components/homepage/main-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const MainFooter: FC = () => {
9191
<Footer.Copyright
9292
by="All Rights Reserved. Flowbite™ is a registered trademark."
9393
href="/"
94-
year={2023}
94+
year={new Date().getFullYear()}
9595
className="text-base"
9696
/>
9797
</div>

content/docs/getting-started/license.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn more about the open-source licensing rights of the Flowbite R
55

66
## MIT License
77

8-
Copyright &copy; 2023 Bergside Inc.
8+
Copyright &copy; 2024 Bergside Inc.
99

1010
Permission is hereby granted, free of charge, to any person obtaining a copy
1111
of this software and associated documentation files (the "Software"), to deal

src/components/Datepicker/helpers.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,20 @@ describe('addYears', () => {
134134
it('returns a new date by adding the specified number of years', () => {
135135
const date = new Date(2023, 0, 1); // January 1st, 2023
136136
const newDate = addYears(date, 5);
137-
expect(newDate.getFullYear()).toBe(2028);
137+
expect(newDate.getFullYear()).toBe(date.getFullYear() + 5);
138138
});
139139

140140
it('returns a new date by subtracting the specified number of years', () => {
141141
const date = new Date(2023, 0, 1); // January 1st, 2023
142142
const newDate = addYears(date, -2);
143-
expect(newDate.getFullYear()).toBe(2021);
143+
expect(newDate.getFullYear()).toBe(date.getFullYear() - 2);
144144
});
145145

146146
it('does not modify the original date', () => {
147147
const date = new Date(2023, 0, 1); // January 1st, 2023
148148
const newDate = addYears(date, 5);
149149
expect(date.getFullYear()).toBe(2023);
150-
expect(newDate.getFullYear()).toBe(2028);
150+
expect(newDate.getFullYear()).toBe(date.getFullYear() + 5);
151151
});
152152
});
153153

0 commit comments

Comments
 (0)