Creating a Dynamic Date Filed

Discussion in 'HTML' started by Sue Roussie, Jul 13, 2004.

  1. Sue Roussie

    Sue Roussie Guest

    Hi,

    This newbie needs some help. I have a drop down box that needs to
    display 7 days worth of dates.

    Example: Today is the 13th. The drop down box would display the dates
    of: July 20, July 21, July 22, etc. The kicker also is that I need to
    exclude Sundays.

    Can this be done? And if so, how would I do it. My form is using a
    simple cgi script to e-mail the results to a person.

    Thanks,
    Sue
     
    Sue Roussie, Jul 13, 2004
    #1
    1. Advertising

  2. Sue Roussie

    Jeff Thies Guest

    Sue Roussie wrote:

    > Hi,
    >
    > This newbie needs some help. I have a drop down box that needs to
    > display 7 days worth of dates.
    >
    > Example: Today is the 13th. The drop down box would display the dates
    > of: July 20, July 21, July 22, etc. The kicker also is that I need to
    > exclude Sundays.
    >
    > Can this be done? And if so, how would I do it.


    This is not an html question, but this is an alt group so:

    The local time function will give you this:

    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
    localtime();

    if($wday eq '0'){
    print 'It\'s sunday';
    }

    The problem you will have is accounting for the different lengths of
    months and accounting for leap year because your days will span months.

    If you know some perl you can build this out of the "everything and the
    kitchen sink" of perl modules:

    <URL: http://www.cise.ufl.edu/~sbeck/DateManip.html >

    That will even tell you if it is a holiday. There is a wide range of
    date formatting available.

    alt.perl may be a better group for you to sort this through.

    Jeff





    My form is using a
    > simple cgi script to e-mail the results to a person.
    >
    > Thanks,
    > Sue
    >
     
    Jeff Thies, Jul 13, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patricia Kline

    application filed to initialize properly

    Patricia Kline, Feb 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    522
    Patricia Kline
    Feb 26, 2004
  2. RSB

    How to Validate a Date Filed.

    RSB, May 20, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    522
    John Oakes
    May 21, 2004
  3. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,285
    Michael Borgwardt
    May 30, 2004
  4. Savvas Tsitouridis

    Date filed in Access Database

    Savvas Tsitouridis, Jul 3, 2007, in forum: ASP General
    Replies:
    3
    Views:
    125
    Evertjan.
    Jul 3, 2007
  5. Jorntk

    dynamic generate form filed

    Jorntk, Apr 23, 2004, in forum: Javascript
    Replies:
    2
    Views:
    91
    Grant Wagner
    Apr 23, 2004
Loading...

Share This Page