mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
比赛功能也太难写了
This commit is contained in:
1 parent
f73859a42f
commit
32ad47e031
16 files changed
+195
-176
No files matched your search
@@ -27,3 +27,14 @@ Array.isDiff = function isDiff(a, b) {
|
||||
if (a[i] != b[i]) return true;
|
||||
return false;
|
||||
};
|
||||
|
||||
Date.prototype.format = function (fmt = '%Y-%m-%d %H:%M:%S') {
|
||||
return fmt
|
||||
.replace('%Y', this.getFullYear())
|
||||
.replace('%m', this.getMonth() + 1)
|
||||
.replace('%D', this.getDate())
|
||||
.replace('%d', this.getDate())
|
||||
.replace('%H', this.getHours())
|
||||
.replace('%M', this.getMinutes())
|
||||
.replace('%S', this.getSeconds());
|
||||
};
|
||||
Reference in new issue
Block a user