I want to make a Tiddler that displays the page last modified timestamp of the enclosing TiddlyWiki. Is it possible to do this with the Server Side Includes (SSI) variable, LAST_MODIFIED?
I don't get consistent results across browsers with this JavaScript program (I installed the InlineJavascriptPlugin) when I paste it into a Tiddler. <script> > > var days = new Array(8); > days[1] = "Sunday"; > days[2] = "Monday"; > days[3] = "Tuesday"; > days[4] = "Wednesday"; > days[5] = "Thursday"; > days[6] = "Friday"; > days[7] = "Saturday"; > var months = new Array(13); > months[1] = "January"; > months[2] = "February"; > months[3] = "March"; > months[4] = "April"; > months[5] = "May"; > months[6] = "June"; > months[7] = "July"; > months[8] = "August"; > months[9] = "September"; > months[10] = "October"; > months[11] = "November"; > months[12] = "December"; > var dateObj = new Date(document.lastModified); > var hours = dateObj.getHours(); > if (hours < 10) {hours = "0" + hours;}; > var minutes = dateObj.getMinutes(); > if (minutes < 10) {minutes = "0" + minutes;}; > var seconds = dateObj.getSeconds(); > if (seconds < 10) {seconds = "0" + seconds;}; > var wday = days[dateObj.getDay() + 1]; > var lmonth = months[dateObj.getMonth() + 1]; > var day = dateObj.getDate(); > var fyear = dateObj.getYear(); > if (fyear < 2000) {fyear = fyear + 1900;}; > > var msg="Last Modified [" + wday + ", " + lmonth + > " " + day + ", " + fyear + " – " + hours + ":" + > minutes + ":" + seconds + " PST]"; > > return(msg); > > </script> My webhost supports SSI. The script I found on http://www.javascriptkit.com/script/cut8.shtml works in a plain HTML file. <html> > <body> > <!--#config timefmt="[%H:%M:%S %Z - %A, %B %d, %Y]" --> > <script type="text/javascript"> > > //Page Last Modified Date script- By JavaScriptKit.com > //Visit http://www.javascriptkit.com for full source code > //This notice must stay intact for use > > var docmodified='<!--#echo var="LAST_MODIFIED" -->' > document.write('Last modified: ' + docmodified); > </script> > </body> > </html> > Thanks. ---Pam -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/uJ-PYJIZMYUJ. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.