Aspcms关于时间格式[content:date style=]的修改
举个例子:
要增加一个这样的[content:date style=AAA-d-yyy]时间样式
在inc/AspCms_MainClass.asp中找到
if str=”content” or str=”aboutcontent” or str=”news” or str=”product” or str=”down” or str=”pic” then
继续向下
case “date”
timestyle = parseArr(fieldArr)(“style”) : if isNul(timestyle) then timestyle = “m-d”
select case timestyle
case “yy-m-d”
nloopstr = replace(nloopstr,matchfield.value,FormatDate(rsObj(“AddTime”),1))
case “y-m-d”
nloopstr = replace(nloopstr,matchfield.value,FormatDate(rsObj(“AddTime”),2))
case “m-d”
nloopstr = replace(nloopstr,matchfield.value,FormatDate(rsObj(“AddTime”),3))
‘增加一个,参数设为10,case设为AAA-d-yyy,对应标签中的style
case “AAA-d-yyy”
nloopstr = replace(nloopstr,matchfield.value,FormatDate(rsObj(“AddTime”),10))
end select
然后在inc/AspCms_CommonFun.asp中找到
‘转换时间
Function formatDate(Byval t,Byval ftype)
在end select上面添加一个case 10
case 10
dim mArray:mArray = Array(“Jan”,”Feb”,”Mar”,”Apr”,”May”,”Jun”,”Jul”,”Aug”,”Sep”,”Oct”, “Nov”,”Dec”)
formatDate=mArray(clng(m)-1)&” “&d&”.”&y
end select
ok 可以了