1 Reply Latest reply on Oct 19, 2015 6:44 AM by Jon Fritz II

    "Date Last Edited" Automatically Updated on Save?

    Jack Level 1

      Please let me know if it is possible automatically to have the "date last saved" updated on some of my web pages, and if so, steps to get that going.

        • 1. Re: "Date Last Edited" Automatically Updated on Save?
          Jon Fritz II Adobe Community Professional & MVP

          Sure, it's not built into DW though.


          Here's a javascript that would do the trick. Copy this part into a new .js file and call it "date.js"...


          months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];

          var d = new Date();

          var weekday = new Array(7);

          weekday[0] = "Sunday";

          weekday[1] = "Monday";

          weekday[2] = "Tuesday";

          weekday[3] = "Wednesday";

          weekday[4] = "Thursday";

          weekday[5] = "Friday";

          weekday[6] = "Saturday";


          var d = new Date();



          var theDate = new Date(document.lastModified);

          theDate.setTime((theDate.getTime()+(60*60)) )

          with (theDate) {

          document.write("<i>Last updated "+weekday[getDay()]+' '+months[getMonth()]+' '+getDate()+', '+d.getFullYear()+' @ '+getHours()+':'+getMinutes()+" DST</i>")



          Here's a base html page that attaches to the date.js file. Place the bold part wherever you want the date to show in your page and make sure the "path-to" part is the actual path to your .js file...


          <!doctype html>

          <html lang="en-us">


          <meta charset="utf-8">

          <title>Add date from Last Modified of document</title>




          <script src="path-to/date.js" script type="text/javascript"></script>