RMS.Manage.Web/Scripts/extension.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
String.prototype.dateFormat = function () {
if (this.indexOf('Date')>0) {
var timestamp = this.replace("/Date(", "").replace(")/", "");
if (!timestamp) {
return;
}
now = new Date(parseInt(timestamp, 10));
var year = now.getFullYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
} else {
return new Date(this);
}
}
/**
* @param d the delimiter
* @param p the pattern of your date
* @rebuilder kimsoft
* @version build 2006.12.15
*/
String.prototype.toDate = function (delimiter, pattern) {
delimiter = delimiter || "-";
pattern = pattern || "ymd";
var a = this.split(delimiter);
var y = parseInt(a[pattern.indexOf("y")], 10);
//remember to change this next century ;)
if (y.toString().length <= 2) y += 2000;
if (isNaN(y)) y = new Date().getFullYear();
var m = parseInt(a[pattern.indexOf("m")], 10) - 1;
var d = parseInt(a[pattern.indexOf("d")], 10);
if (isNaN(d)) d = 1;
return new Date(y, m, d);
};
String.prototype.trim = function () {
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.isNullOrEmpty = function () {
return null === this || this == "";
};
String.prototype.isNullOrWhiteSpace = function () {
return this.trim().isNullOrEmpty();
};
/**
* @param d the delimiter
* @param p the pattern of your date yyyy-MM-dd hh:mm:ss
* @author meizz
* @author kimsoft add w+ pattern
*/
Date.prototype.format = function (style) {
var o = {
"M+": this.getMonth() + 1, //month
后面还有 33 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。