| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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)?0 kd>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)?0 tf<d1);} // Kaosweaver End of Calendar Settings - do not remove |
|
#2
|
||||
|
||||
|
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; 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! |
|
#3
|
|||
|
|||
|
Seems to have done the trick, thank you muchly!!
Quote:
|
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Need UK date format no US |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|