Skip to content

Instantly share code, notes, and snippets.

@ricardozea
Last active March 3, 2021 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardozea/9077361 to your computer and use it in GitHub Desktop.
Save ricardozea/9077361 to your computer and use it in GitHub Desktop.
UPDATE: Use this one instead: https://snippets.cacher.io/snippet/dcd110499b3150c77795 ~~Script for year so you don't have to type it or have old pages display past years.~~
/*
Script to display the year.
Edited by: Ricardo Zea
*/
var time=new Date();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
document.write(" " + year + " ");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment