Looking for a date\calendar script

2 replies
Hi,

Does anyone know of a script that will let me input a calendar date, then output a date or list of dates (x) number of days from the date entered?

Ex: Entering Jan 1, 2009, could generate a list of dates 15, 19, 45, etc... days from Jan 1, 2009.

Thanks.

Michael
#calendar #datecalendar #script #script needed
  • Profile picture of the author Leron Ford
    This script might do the trick.

    <!-- TWO STEPS TO INSTALL FUTURE DATE:
    1. Copy the coding into the HEAD of your HTML document
    2. Add the last code into the BODY of your HTML document -->
    <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
    <SCRIPT language="JavaScript">
    <!-- Original: Kevin Myers -->
    <!-- Begin
    function AddDays(form) {
    DaysToAdd=document.form.DaysToAdd.value;
    var now=new Date();
    var newdate=new Date();
    var newtimems=newdate.getTime()+(DaysToAdd*24*60*60*10 00);
    newdate.setTime(newtimems);
    document.form.display.value=newdate.toLocaleString ();
    }
    // End -->
    </SCRIPT>
    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->
    <center>
    <form name=form>
    <input type=text name=DaysToAdd size=5 value=10>
    <input type=button value="days from today will be..." onclick="AddDays(this.form)">
    <input type=text name="display" size=35 value="">
    </form>
    </center>
    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by The JavaScript Source</a></font>
    </center><p>
    <!-- Script Size: 1.02 KB -->



    Hope that helps.

    Thanks,

    Leron
    {{ DiscussionBoard.errors[337528].message }}
    • Profile picture of the author mwright
      Thanks Leron,

      This gave a different result than I was looking for, but it was a place to start.

      BTW - would have thanked you sooner, but I haven't been to the forum in a few months.
      {{ DiscussionBoard.errors[651944].message }}

Trending Topics