摘要:
publicstaticintDateToTimestamp(DateTimedate){DateTimeorigin=newDateTime(1970,1,1,0,0,0,0);TimeSpandiff=date-origin;inttimestamp=(int)Math.Floor(diff.TotalSeconds);returntimestamp;}publicstaticDateTimeTimestampToDate(doubletimestamp){DateTimeorigin=newDateTime(1970,1,1,0,0,0,0);DateTimedate=origin.Ad 阅读全文
摘要:
Html TO Ubb and Ubb TO Htmlfunctionpattern(str){//str=str.replace(/(\r\n|\n|\r)/ig,'');str=str.replace(/<br[^>]*>/ig,'\n');str=str.replace(/<p[^>\/]*\/>/ig,'\n');str=str.replace(/\[code\](.+?)\[\/code\]/ig,function($1,$2){returnphpcode($2);});str=str.replace 阅读全文