fix: current year in footer #79

Open
opened 2025-04-09 15:00:54 +00:00 by tcsenpai · 0 comments
Owner

Originally created by @Devansh-Baghel on 1/10/2024

Problem

Current year in the footer was hardcoded to 2023 through a CURR_YEAR constant, which meant it would only update when someone updated that constant every year.

Changes Made

  • Used javascript's in-built new Date().getFullYear() to replace the hardcoded year in the footer.
  • Also removed the import of that constant in the same file.

Initially i wanted to change the CURR_YEAR constant itself to new Date().getFullYear() but i didn't end up doing that as that may break some functionality in src/pages/Wrapped/Wrapped.js

Screenshots

Before

Screenshot from 2024-01-10 19-33-56

After

Screenshot from 2024-01-10 19-34-34

*Originally created by @Devansh-Baghel on 1/10/2024* ## Problem Current year in the footer was hardcoded to 2023 through a `CURR_YEAR` constant, which meant it would only update when someone updated that constant every year. ## Changes Made - Used javascript's in-built `new Date().getFullYear()` to replace the hardcoded year in the footer. - Also removed the import of that constant in the same file. Initially i wanted to change the `CURR_YEAR` constant itself to `new Date().getFullYear()` but i didn't end up doing that as that may break some functionality in `src/pages/Wrapped/Wrapped.js` ## Screenshots ### Before ![Screenshot from 2024-01-10 19-33-56](https://github.com/avgupta456/github-trends/assets/77718741/e50e3669-e9bd-48d4-80d0-30ca43a6daba) ### After ![Screenshot from 2024-01-10 19-34-34](https://github.com/avgupta456/github-trends/assets/77718741/a1e61f05-a4d1-4f17-bf13-d8a236197c29)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/github-trends#79
No description provided.