code/Athena0.0.1/Web/Content/js/kohelper.js
(开头部分) 14KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* ko.bindingHandlers.display 依赖 bootstrap 模态框组件
*/
(function () {
if (!ko)
return;
window._ob = ko.observable;
window._oba = ko.observableArray;
function format(format) {
var o =
{
"M+": this.getMonth() + 1, //month
"d+": this.getDate(), //day
"h+": this.getHours(), //hour
"m+": this.getMinutes(), //minute
"s+": this.getSeconds(), //second
"q+": Math.floor((this.getMonth() + 3) / 3), //quarter
"S": this.getMilliseconds() //millisecond
};
if (/(y+)/.test(format))
format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(format))
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
return format;
}
function parseISO8601Date(s) {
// parenthese matches:
// year month day hours minutes seconds
// dotmilliseconds
// tzstring plusminus hours minutes
//var re = /(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(\.\d+)?(Z|([+-])(\d\d):(\d\d))/;
var re = /(\d{4})-(\d\d?)-(\d\d?)\s?T?(\d\d?)?:?(\d\d?)?:?(\d\d?)?(\.\d+)?(Z|([+-])(\d\d):(\d\d))?/;
var d = [];
d = s.match(re);
// "2010-12-07T11:00:00.000-09:00" parses to:
// ["2010-12-07T11:00:00.000-09:00", "2010", "12", "07", "11",
// "00", "00", ".000", "-09:00", "-", "09", "00"]
// "2010-12-07T11:00:00.000Z" parses to:
// ["2010-12-07T11:00:00.000Z", "2010", "12", "07", "11",
// "00", "00", ".000", "Z", undefined, undefined, undefined]
if (!d) {
//throw "Couldn't parse ISO 8601 date string '" + s + "'";
return new Date(s);
}
// parse strings, leading zeros into proper ints
var a = [1, 2, 3, 4, 5, 6, 10, 11];
for (var i in a) {
d[a[i]] = parseInt(d[a[i]], 10);
if (!d[a[i]]) d[a[i]] = 0;
}
后面还有 350 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
