SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Peterborough, England
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    First of all, thanks for taking your time to read this thread,

    I have found JAVA-Scripts that display the date, which simply shows what the date set on their computer is. I am now looking for a Script that will show the date on people’s computer, minus 2 weeks (14 days). The reason for this is I would like to include on my web site “last up-dated (and then the date 2 weeks ago)”. I do in fact update the site at least every week, but feel it would be a lot easier if I did not have to upload the whole site again, as I have “last updated” on many pages and changing them all has become tedious.

    A simple (I hope) JAVA-Script would save be a lot of time and hassle.

    I look forward to a reply to this thread,

    Internationally.

  2. #2
    SitePoint Zealot freejavahelp's Avatar
    Join Date
    Jul 2000
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use SSI it will save a TON of time

    change one file.....all the pages change

    Jim

    http://www.freejavahelp.com
    Making Java REALLY Easy
    Tutorials, Forums, and Articles

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Peterborough, England
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is SSI?

    I would prefer Java I think.

  4. #4
    Lord of the Underworld
    Join Date
    May 2000
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just so you know, Javascript and java are completely different things, and SSI is completely different again!

    I'm going to go to sleep (early start) but would someone else please finish this post off for me?

    Adam

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2000
    Location
    Catalonia
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code below shows you: "15 September 2000". I didn't add the weekday because it made the "sentence" too long. but if you want you can add it by: var days = new Array ("Monday"........) as below. and then add it to the document.write.


    var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
    var today = new Date(); var month = today.getMonth(); var date = today.getDate();
    var weekday = today.getDay(); today = null; function data(){ document.write(date
    + " " + months[month] + " 2000"); }

    Add this to a day.js file and then include it to your pages.


  6. #6
    SitePoint Zealot freejavahelp's Avatar
    Join Date
    Jul 2000
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'd really suggest SSI

    it is one line, and a no brainer, go to echodev.com and read their 1 page SSI article. It will tell you what you need to know

    Jim
    http://www.freejavahelp.com
    Making Java REALLY Easy
    Tutorials, Forums, and Articles

  7. #7
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can automatically display the "last modified" date of any page using the following JavaScript:

    Code:
    <script language="JavaScript">
    <!--
    document.write(document.lastModified);
    //-->
    </script>
    Enjoy!
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •