Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Creating a Dynamic Date Filed

Reply
Thread Tools

Creating a Dynamic Date Filed

 
 
Sue Roussie
Guest
Posts: n/a
 
      07-13-2004
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

 
Reply With Quote
 
 
 
 
Jeff Thies
Guest
Posts: n/a
 
      07-13-2004
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,$isd st) =
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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date filed in Access Database Savvas Tsitouridis ASP General 3 07-03-2007 11:25 AM
COMPLAINT FILED CITIZEN OF INDIA MCSE 30 07-02-2004 05:13 AM
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM
How to Validate a Date Filed. RSB ASP .Net 6 05-21-2004 09:06 PM
dynamic generate form filed Jorntk Javascript 2 04-23-2004 03:14 PM



Advertisments