Skip to content

NordicNode

Open Source,Tweaks,Everything!

Categories

  • Board Game
  • Bookmarklets
  • Desktop
  • Disc Burning
  • File Managers
  • First Person Shooter
  • Free
  • Games
  • Graphic
  • Internet & Network
  • Javascript
  • Music and Audio
  • Operating System
  • P2P
  • PHP
  • Platform
  • Products
  • Programming
  • Role Playing Game
  • Security
  • Security
  • Server Stuff
  • Strategy
  • System Utilities
  • Tweaks, Tips & Tricks
  • UserScripts
  • VB.net
  • Video
  • Webmaster Resources
  • Wordpress

Tag: JavaScript

JavaScript: Show the current year (4 digits)

JavaScript: Show the current year (4 digits)

Use Javascript to show the current year in a HTML-document to display the date.
Remember that Javascript is using the clients time-settings.

.

JavaScript Code:

<script>document.write(new Date().getFullYear());</script>

Output: 2019

And that’s everything needed to make this magic happen.

Posted on June 6, 2019June 6, 2019Categories JavascriptTags Date, JavaScriptLeave a comment on JavaScript: Show the current year (4 digits)
Sitemap Our Policy & Legal Terms Digital Magic by WordPress
NordicNode.com © Copyright