Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Date & Calendar >> Last Modified or Refreshed Date Stamp


Code Snippet </> Info


Snippet Name: Last Modified or Refreshed Date Stamp

Description: The last modified or refreshed date stamp code snippet can be very useful for letting your visitors know the the last time you updated your Privacy, TOS, Info pages without you having to physically change dates on your pages. This snippet goes a bit further than most... it reflects the last modified date and time stamp in the visitors time zone and not the servers time stamp.
Compatible Modern Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser

Example: View Code Demo

Note:

Author: SnapBuilder <snippets@snapbuilder.com>

Last Modified: 2019-12-09 02:32:34

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying
Copied To Clipboard!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.1 Transitional//EN"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Last Modified or Refreshed Date Stamp</title> <style> html {margin:0; padding:0;} BODY {font-family:verdana,arial,ms sans serif; font-size:100%; background-color:#ffffff; color:#000000; text-shadow:0px 1px 1px rgba(0,0,0,0.2);} a {color:#69C;text-decoration:none;} a:hover {color:#F60; text-decoration:underline;} #wrapper {margin:0; padding:15px 15px 15px 15px;} </style> </head> <body> <div id="wrapper"> <h3>Last Modified or Refreshed Date Stamp</h3> <p>The last modified or refreshed date stamp code snippet can be very useful for letting your visitors know the the last time you updated your Privacy, TOS, Info pages without you having to physically change dates on your pages.</p> <p>Each time you make any changes to your page, the date stamp snippet code will automatically show the information on the page.</p> <p>This snippet goes a bit further than most... it reflects the last modified date and time stamp in the visitors time zone and not the servers time stamp. Go ahead, change your computers time zone and refresh the page for an example.</p> <p>Simply place the small code snippet where you want the last modified or refreshed date stamp to print the text.</p> <p><b>Example:</b> <script> <!-- Begin Last Modified or Refreshed Date Stamp // == This Script Free To Use Providing This Notice Remains == // // == This Script Has Been Found In The https://snapbuilder.com Free Public Codes Library == // // == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == // // == Created by: SnapBuilder.com : http://snapbuilder.com : Creative Commons License 3.0+ == // var snapTime = document.lastModified; var anotherDateObject = new Date(Date.parse(snapTime)); document.write("<div align='left'>This Page Last Updated: "); document.write(anotherDateObject); document.write("</div>"); // --> </script> </p> </div> </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library