Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update footer to dynamically display current year #88

Closed
wants to merge 1 commit into from

Conversation

zahyaah
Copy link

@zahyaah zahyaah commented Aug 31, 2024

Issue #87

Changes made

  • Replaced the static year text with a <span id="year"> </span> element.
Screenshot 2024-08-31 at 4 53 02 PM
  • Added a JavaScript snippet that sets the text content of the span to the current year when the page loads.
Screenshot 2024-08-31 at 4 51 01 PM

@sekpd
Copy link
Contributor

sekpd commented Aug 31, 2024

Wouldn't it be better to use something like:

<p>© {new Date().getFullYear()}. All rights reserved.</p>

so the footer date is generated statically during build and isn't dependent on user's system date?

@zahyaah
Copy link
Author

zahyaah commented Aug 31, 2024

Oh yes, let me change that quickly @sekpd
Thanks mate :)

@zahyaah zahyaah closed this Aug 31, 2024
@zahyaah zahyaah deleted the date branch August 31, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants