求一段网站显示英文日期和星期的代码

来源:百度知道 编辑:UC知道 时间:2024/05/13 11:52:18
要求显示Today is: May 4th, 2008 Mon.这样的形式。多谢!

<script LANGUAGE="JavaScript">
<!-- Begin
function number(x) {
if (x==1) return "one"; if (x==2) return "two"; if (x==3) return "three";
if (x==4) return "four"; if (x==5) return "five"; if (x==6) return "six";
if (x==7) return "seven"; if (x==8) return "eight"; if (x==9) return "nine";
if (x==10) return "ten"; if (x==11) return "eleven"; if (x==12) return "twelve";
return x; //default
}
function ishtime(h,m) {
h = number(h)
if (m<=3 || m>57) return h+" o'clock";
试一下