use unix instead of php formatting
This commit is contained in:
parent
a8c726ba81
commit
2258fe14a1
@ -114,7 +114,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
flavors: ['http://regex.info/exif.cgi?url=', 'http://iqdb.org/?url=', 'http://tineye.com/search?url=', '#http://saucenao.com/search.php?db=999&url='].join('\n'),
|
flavors: ['http://regex.info/exif.cgi?url=', 'http://iqdb.org/?url=', 'http://tineye.com/search?url=', '#http://saucenao.com/search.php?db=999&url='].join('\n'),
|
||||||
time: '%m/%d/%y(%D)%H:%i',
|
time: '%m/%d/%y(%a)%H:%M',
|
||||||
updater: {
|
updater: {
|
||||||
checkbox: {
|
checkbox: {
|
||||||
'Verbose': [true, 'Show countdown timer, new post count'],
|
'Verbose': [true, 'Show countdown timer, new post count'],
|
||||||
@ -1675,13 +1675,13 @@
|
|||||||
switch (c) {
|
switch (c) {
|
||||||
case '%':
|
case '%':
|
||||||
return '%';
|
return '%';
|
||||||
case 'A':
|
|
||||||
case 'D':
|
|
||||||
case 'H':
|
|
||||||
case 'a':
|
case 'a':
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'H':
|
||||||
case 'm':
|
case 'm':
|
||||||
|
case 'M':
|
||||||
|
case 'p':
|
||||||
|
case 'P':
|
||||||
case 'y':
|
case 'y':
|
||||||
return "' + time." + c + "() + '";
|
return "' + time." + c + "() + '";
|
||||||
break;
|
break;
|
||||||
@ -1714,35 +1714,35 @@
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
A: function() {
|
a: function() {
|
||||||
|
return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][this.date.getDay()];
|
||||||
|
},
|
||||||
|
d: function() {
|
||||||
|
return this.zeroPad(this.date.getDate());
|
||||||
|
},
|
||||||
|
H: function() {
|
||||||
|
return this.zeroPad(this.date.getHours());
|
||||||
|
},
|
||||||
|
m: function() {
|
||||||
|
return this.zeroPad(this.date.getMonth() + 1);
|
||||||
|
},
|
||||||
|
M: function() {
|
||||||
|
return this.zeroPad(this.date.getMinutes());
|
||||||
|
},
|
||||||
|
p: function() {
|
||||||
if (this.date.getHours() < 12) {
|
if (this.date.getHours() < 12) {
|
||||||
return 'AM';
|
return 'AM';
|
||||||
} else {
|
} else {
|
||||||
return 'PM';
|
return 'PM';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
D: function() {
|
P: function() {
|
||||||
return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][this.date.getDay()];
|
|
||||||
},
|
|
||||||
H: function() {
|
|
||||||
return this.zeroPad(this.date.getHours());
|
|
||||||
},
|
|
||||||
a: function() {
|
|
||||||
if (this.date.getHours < 12) {
|
if (this.date.getHours < 12) {
|
||||||
return 'am';
|
return 'am';
|
||||||
} else {
|
} else {
|
||||||
return 'pm';
|
return 'pm';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
d: function() {
|
|
||||||
return this.zeroPad(this.date.getDate());
|
|
||||||
},
|
|
||||||
i: function() {
|
|
||||||
return this.zeroPad(this.date.getMinutes());
|
|
||||||
},
|
|
||||||
m: function() {
|
|
||||||
return this.zeroPad(this.date.getMonth() + 1);
|
|
||||||
},
|
|
||||||
y: function() {
|
y: function() {
|
||||||
return this.date.getFullYear() - 2000;
|
return this.date.getFullYear() - 2000;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ config =
|
|||||||
'http://tineye.com/search?url='
|
'http://tineye.com/search?url='
|
||||||
'#http://saucenao.com/search.php?db=999&url='
|
'#http://saucenao.com/search.php?db=999&url='
|
||||||
].join '\n'
|
].join '\n'
|
||||||
time: '%m/%d/%y(%D)%H:%i'
|
time: '%m/%d/%y(%a)%H:%M'
|
||||||
updater:
|
updater:
|
||||||
checkbox:
|
checkbox:
|
||||||
'Verbose': [true, 'Show countdown timer, new post count']
|
'Verbose': [true, 'Show countdown timer, new post count']
|
||||||
@ -1322,7 +1322,7 @@ time =
|
|||||||
code = $.config('time').replace /%(.)/g, (s, c) ->
|
code = $.config('time').replace /%(.)/g, (s, c) ->
|
||||||
switch c
|
switch c
|
||||||
when '%' then '%'
|
when '%' then '%'
|
||||||
when 'A', 'D', 'H', 'a', 'd', 'i', 'm', 'y' then "' + time.#{c}() + '"
|
when 'a', 'd', 'H', 'm', 'M', 'p', 'P', 'y' then "' + time.#{c}() + '"
|
||||||
else s
|
else s
|
||||||
time.funk = Function 'time', "return '#{code}'"
|
time.funk = Function 'time', "return '#{code}'"
|
||||||
|
|
||||||
@ -1342,8 +1342,7 @@ time =
|
|||||||
$.replace s, timeEl
|
$.replace s, timeEl
|
||||||
|
|
||||||
zeroPad: (n) -> if n < 10 then '0' + n else n
|
zeroPad: (n) -> if n < 10 then '0' + n else n
|
||||||
A: -> if @date.getHours() < 12 then 'AM' else 'PM'
|
a: -> [
|
||||||
D: -> [
|
|
||||||
'Sun'
|
'Sun'
|
||||||
'Mon'
|
'Mon'
|
||||||
'Tue'
|
'Tue'
|
||||||
@ -1352,11 +1351,12 @@ time =
|
|||||||
'Fri'
|
'Fri'
|
||||||
'Sat'
|
'Sat'
|
||||||
][@date.getDay()]
|
][@date.getDay()]
|
||||||
H: -> @zeroPad @date.getHours()
|
|
||||||
a: -> if @date.getHours < 12 then 'am' else 'pm'
|
|
||||||
d: -> @zeroPad @date.getDate()
|
d: -> @zeroPad @date.getDate()
|
||||||
i: -> @zeroPad @date.getMinutes()
|
H: -> @zeroPad @date.getHours()
|
||||||
m: -> @zeroPad @date.getMonth() + 1
|
m: -> @zeroPad @date.getMonth() + 1
|
||||||
|
M: -> @zeroPad @date.getMinutes()
|
||||||
|
p: -> if @date.getHours() < 12 then 'AM' else 'PM'
|
||||||
|
P: -> if @date.getHours < 12 then 'am' else 'pm'
|
||||||
y: -> @date.getFullYear() - 2000
|
y: -> @date.getFullYear() - 2000
|
||||||
|
|
||||||
titlePost =
|
titlePost =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user