Web Design and Development Forums

Date Display - java script

This is a discussion on "Date Display - java script" within the Java, JSP, Cold Fusion section. This forum, and the thread "Date Display - java script are both part of the Program Your Website category.

Old Mar 25th, 2008, 11:54   #1 (permalink)
New Member
 
Join Date: Mar 2008
Location: India
Age: 24
Posts: 2
Thumbs up Date Display - java script

Hello ,

Can any body help me to show the saturday & Tuesday date of current week.

I want to display it in below formate;

Saturday, Mar 29, 2008

Tuesday, Mar 27, 2008


The date should be change dynamically on next saturday and tuesday.


It would be very thankful in regards on this concern.

Thanks
Kiran
ksolanki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 26th, 2008, 08:28   #2 (permalink)
Junior Member
 
Join Date: Oct 2007
Location: Sweden
Age: 29
Posts: 25
Re: Date Display - java script

it can be something like this:

Code: Select all
<script type="text/javascript">
var currentdate= new Date();
currentdate.setDate(currentdate.getDate());
var week = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'];
var sat=new Date();
var tue=new Date();
var today=currentdate.toString();
var Day = today.substring(0,3);
for(i=0;i<week.length;i++){
    if(Day===week[i]){
        document.write('Current date : '+currentdate);
        document.write('<br/>');
                
        tue.setDate(currentdate.getDate()+(1-i));        
        document.write(' '+tue);
        document.write('<br/>');
        sat.setDate(currentdate.getDate()+(5-i));
        document.write(' '+sat);        
        
    }
}
</script>
aihazm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 26th, 2008, 09:51   #3 (permalink)
Highly Reputable Member
 
Join Date: Oct 2007
Location: Stockport
Age: 16
Posts: 738
Blog Entries: 1
Re: Date Display - java script

If your host supports it, then you can also do this through php

http://www.w3schools.com/php/php_date.asp
http://www.gotfusion.com/tutsTD/php-date.cfm

Craig
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
current week day, date display

Thread Tools
Rate This Thread
Rate This Thread:

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
hi icon generator in Java Script srikanth JavaScript Forum 1 Sep 7th, 2006 17:24
Java Script HELP!!!! dandaman2006 JavaScript Forum 1 May 22nd, 2006 10:07
calculator making in Java script s_mazhar JavaScript Forum 4 Oct 9th, 2005 14:33
Not sure this is a java script question? haans_gruber JavaScript Forum 7 Sep 3rd, 2005 01:56
Server time and date script gribble JavaScript Forum 1 Aug 16th, 2005 09:53



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 23:01.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59