Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 17th, 2004, 10:00 AM
craigchalmers craigchalmers is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 4 craigchalmers User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 48 sec
Reputation Power: 0
Question Need UK date format no US

Hi, i am a total novice, and i have no idea how to make my date format d/m/y, instead of m/d/y, any advice would be a life saver.

This is the code i have
// Kaosweaver Calendar Settings - do not remove
// by Paul Davis - http://www.kaosweaver.com
// KW_lang[English]
// KW_order[0,1,2]
// KW_del1[/]
// KW_del2[/]
// KW_dd[true]
// KW_cWidth[170]
// KW_fd[-1]

var sDate = new Array();
var mName = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var wName = new Array("Su","Mo","Tu","We","Th","Fr","Sa")
var cFontName = "Arial, Helvetica, sans-serif;"
var KW_color = new Array("#ffffff","#ffcccc","#999999","#ffffff","#ccffcc","#cccccc","#000000","#000000")
var KW_cl=0;
var KW_od=-1;
var KW_tmo=0;
var KW_cWidth=170;
var KW_fd=-1;
var descx=-1;
var descy=-1;
var bwNN=(document.captureEvents)?1:0;
function popmousemove(e){descx=(bwNN)?e.pageX:event.x;descy =(bwNN)?e.pageY:event.y}
function KW_mouseInit(){
if(bwNN)document.captureEvents(Event.MOUSEMOVE);do cument.onmousemove=popmousemove;
}
function m_class(m,d,y) {
this.month=m;this.day=d;this.year=y;this.output=th is.month+"/"+this.day+"/"+this.year;
var kd=new Date();this.special=checkDates(this.day,this.month ,this.year)
this.today=((kd.getMonth()+1)==this.month && kd.getDate()==this.day && kd.getFullYear()==this.year)
var td=new Date(this.year, (this.month-1), this.day+KW_od);this.past=(KW_od==-1)?0kd>td)
var tf=new Date(kd.getFullYear(),kd.getMonth(),kd.getDate()+K W_fd);
var d1=new Date(this.year, (this.month-1), this.day);
this.future=(KW_fd==-1)?0tf<d1);
}

// Kaosweaver End of Calendar Settings - do not remove

Reply With Quote
  #2  
Old October 18th, 2004, 06:07 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
This line (which appears to have lost it's cr/lf) formats the date in the US format:
Code:
this.month=m;this.day=d;this.year=y;this.output=th   is.month+"/"+this.day+"/"+this.year;
Try it like this to reverse the month and date:
Code:
this.month=m;this.day=d;this.year=y;this.output=th   is.day+"/"+this.month+"/"+this.year;
__________________
selwonk

If I've posted some code above, you might think it looks a bit simplistic. It might be. I'd rather people tried the next step themselves rather than getting a full solution on a plate. That way they learn more!

Reply With Quote
  #3  
Old October 18th, 2004, 06:40 AM
craigchalmers craigchalmers is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 4 craigchalmers User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 48 sec
Reputation Power: 0
Smile Seems to have done the trick, thank you muchly!!

Seems to have done the trick, thank you muchly!!



Quote:
Originally Posted by selwonk
This line (which appears to have lost it's cr/lf) formats the date in the US format:
Code:
this.month=m;this.day=d;this.year=y;this.output=th   is.month+"/"+this.day+"/"+this.year;
Try it like this to reverse the month and date:
Code:
this.month=m;this.day=d;this.year=y;this.output=th   is.day+"/"+this.month+"/"+this.year;

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Need UK date format no US


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT