Date.prototype.toLocaleDateString 笑而不语:- 1>1/* :
- %1 @cmd /k %0 :
- @echo off
- for /f "delims=" %%a in ('dir /b *.txt^|cscript -nologo -e:jscript %0 %%~a') do (
- ren %%a
- )
- pause&exit
- */
-
- var text = WSH.StdIn.ReadAll().split(/\r?\n/g)
- for(var i in text){
- var match = text[i].match(/.*(\d{4})(\d{2})0?(\d{2})0?(\d{2})(.*)/)
- if(match){
- var d = new Date(match[1],match[2]-1,match[3])
- WScript.Echo('"' + match[0] + '" "' + d.toLocaleDateString()+match[4]+'时'+match[5] + '"')
- }
- }
复制代码
|