您的位置:首页 > 其它

Ext的日期格式说明

2008-09-07 01:37 399 查看
Ext的日期格式说明,很实用的,如果大家遇到这方面的问题,可以参考一下.

function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}
格式说明例子
d月里面的日期,2位,不足前面补001-31
D星期里面的每天的缩写Mon - Sun
j月里面的日期,前面不补01-31
l星期的完整写法Sunday to Saturday
NISO-8601的星期表示法1=星期一,7是星期日
S英语习惯的月内每天的2位的前缀st, nd, rd or th.
w星期的数字表示0=星期日,6等星期六
Z在年内的第几天,从0开始0-364,闰年是365
WISO-8601格式的,年内的星期数,从星期一开始01-53
F月份的完整文字表示January to December
m月份的2位数字表示,不足前面补零01-12
M月份的缩写文字表示Jan to Dec
n月份的数字表示,不补零1-12
t月份的最大天数28-31
L是否为闰年1是闰年,0则不是
oISO-8601的年份表示,和Y相同,但是如果星期(W)输入前一年或者后一年,则替换为那个年1998,2004
Y4位的年份表示2008
y2位的年份表示98,08
a小写的上下午表示am pm
A大写的上下午AM PM
g12小时制,不补零1-12
G24小时制,不补零0-23
h12小时制,2位,不足补零01-12
H24小时制,2位,不足补零00-23
i分钟,2位,不足补零00-59
s秒,2位,不足补零00-59
u毫秒,前面补零001 999
ODifference to Greenwich time (GMT) in hours and minutes+1030
PDifference to Greenwich time (GMT) with colon between hours and minutes-08:00
TTimezone abbreviation of the machine running the codeEST, MDT, PD
ZTimezone offset in seconds (negative if west of UTC, positive if east)-43200 to 50400
cISO 8601 date (note: milliseconds, if present, must be specified with at least 1 digit. There is no limit to how many digits the millisecond value may contain. see http://www.w3.org/TR/NOTE-datetime for more info)2007-04-17T15:19:21+08:002008-03-16T16:18:22Z
USeconds since the Unix Epoch (January 1 1970 00:00:00 GMT)1193432466 -2138434463
转载自:http://blog.csdn.net/java2000_net/archive/2008/08/21/2804422.aspx

var content=document.getElementById("content");

var contentArray=content.innerHTML.split("page@");
var total=contentArray.length; //总条目: 可变

//取得当前页序号 - idx
idx=window.location.search; //这里得到 ?0 字样
if(idx=="") idx="?0";
mylen=idx.length-1;
idx=idx.substr(mylen,idx.length);

function echostr(pg) { //函数: 打印各页内容
var mystr="";
if(contentArray[pg]) mystr+=contentArray[pg];
document.write(mystr);
}
echostr(idx); //显示页面内容

function pg_link(all){ //函数: 打印页码链接
linkstr="
第 ";
for(i=0;i" + j + " ":linkstr+=j + " ";
}
linkstr+="页";
if(all!=1)
document.write(""+linkstr + "

");
else document.write("");
}

pg_link(total); //显示页码链接

function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}
格式说明例子
d月里面的日期,2位,不足前面补001-31
D星期里面的每天的缩写Mon - Sun
j月里面的日期,前面不补01-31
l星期的完整写法Sunday to Saturday
NISO-8601的星期表示法1=星期一,7是星期日
S英语习惯的月内每天的2位的前缀st, nd, rd or th.
w星期的数字表示0=星期日,6等星期六
Z在年内的第几天,从0开始0-364,闰年是365
WISO-8601格式的,年内的星期数,从星期一开始01-53
F月份的完整文字表示January to December
m月份的2位数字表示,不足前面补零01-12
M月份的缩写文字表示Jan to Dec
n月份的数字表示,不补零1-12
t月份的最大天数28-31
L是否为闰年1是闰年,0则不是
oISO-8601的年份表示,和Y相同,但是如果星期(W)输入前一年或者后一年,则替换为那个年1998,2004
Y4位的年份表示2008
y2位的年份表示98,08
a小写的上下午表示am pm
A大写的上下午AM PM
g12小时制,不补零1-12
G24小时制,不补零0-23
h12小时制,2位,不足补零01-12
H24小时制,2位,不足补零00-23
i分钟,2位,不足补零00-59
s秒,2位,不足补零00-59
u毫秒,前面补零001 999
ODifference to Greenwich time (GMT) in hours and minutes+1030
PDifference to Greenwich time (GMT) with colon between hours and minutes-08:00
TTimezone abbreviation of the machine running the codeEST, MDT, PD
ZTimezone offset in seconds (negative if west of UTC, positive if east)-43200 to 50400
cISO 8601 date (note: milliseconds, if present, must be specified with at least 1 digit. There is no limit to how many digits the millisecond value may contain. see http://www.w3.org/TR/NOTE-datetime for more info)2007-04-17T15:19:21+08:002008-03-16T16:18:22Z
USeconds since the Unix Epoch (January 1 1970 00:00:00 GMT)1193432466 -2138434463
转载自:http://blog.csdn.net/java2000_net/archive/2008/08/21/2804422.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: