update
parent
0f18f9f1df
commit
6b89deefc9
|
@ -43,7 +43,6 @@ if (!Date.prototype.getFullWeek) {
|
||||||
if (!Date.prototype.format) {
|
if (!Date.prototype.format) {
|
||||||
Object.defineProperty(Date.prototype, 'format', {
|
Object.defineProperty(Date.prototype, 'format', {
|
||||||
value: function(str) {
|
value: function(str) {
|
||||||
str = str || 'Y-m-d H:i:s'
|
|
||||||
var dt = {
|
var dt = {
|
||||||
fullyear: this.getFullYear(),
|
fullyear: this.getFullYear(),
|
||||||
year: this.getYear(),
|
year: this.getYear(),
|
||||||
|
@ -58,6 +57,7 @@ if (!Date.prototype.format) {
|
||||||
}
|
}
|
||||||
var reg = null
|
var reg = null
|
||||||
|
|
||||||
|
str = str || 'Y-m-d H:i:s'
|
||||||
dt.g = dt.hours > 12 ? dt.hours - 12 : dt.hours
|
dt.g = dt.hours > 12 ? dt.hours - 12 : dt.hours
|
||||||
|
|
||||||
reg = {
|
reg = {
|
||||||
|
|
Loading…
Reference in New Issue