Skip to content

Commit

Permalink
docs: update for new year (#1215)
Browse files Browse the repository at this point in the history
fix: make footer year dynamic; manually update `license.mdx` year; fix `Datepicker` manual year tests

Co-authored-by: SutuSebastian <sebastian.sutu@stainless-code.com>
  • Loading branch information
SutuSebastian and SutuSebastian authored Jan 5, 2024
1 parent a1b4470 commit 77f5246
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function DocFooter() {
<Footer.Copyright
by="All Rights Reserved. Flowbite™ is a registered trademark."
href="/"
year={2023}
year={new Date().getFullYear()}
className="text-base"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/homepage/main-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const MainFooter: FC = () => {
<Footer.Copyright
by="All Rights Reserved. Flowbite™ is a registered trademark."
href="/"
year={2023}
year={new Date().getFullYear()}
className="text-base"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion content/docs/getting-started/license.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn more about the open-source licensing rights of the Flowbite R

## MIT License

Copyright &copy; 2023 Bergside Inc.
Copyright &copy; 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
Expand Down
6 changes: 3 additions & 3 deletions src/components/Datepicker/helpers.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

Expand Down

1 comment on commit 77f5246

@vercel
Copy link

@vercel vercel bot commented on 77f5246 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.