/    Sign up×
Community /Pin to ProfileBookmark

automatic copyright date updater

I see many web sites with ‘outdated’ copyright dates (e.g., “Copyright 2002 by Me and etc.”)

This should work, -an automatic ‘updater’. Perhaps someone here can confirm this (that the code is correct, I’m a bit rusty at Javascript)

[CODE]
<script>
var date = new Date();
var year = date.getFullYear();
document.write(year);
</script>
[/CODE]

Place this on your page, it will([I]should[/I]!) always show ‘the current year’. Add your own text to make it make sence.

-Joel

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyMar 03.2006 — A copyright lasts (atm) 70 years after the person created the "thing" has passed away, and they are currently trying to extend that to 100 years as "Winnie The Pooh" copyright will be lost in 20 years time. It was at 50 years but the same deal happened with Mickey Mouse and it was extended to the 70.

Anyway, if I were to do this I would just do it server side.
×

Success!

Help @WebJoel spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...