diff --git a/4chan_x.user.js b/4chan_x.user.js
index 8f3389457..d8bed307b 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -958,7 +958,7 @@
var arr, checked, description, dialog, hiddenNum, hiddenThreads, html, input, key, li, link, main, obj, ul, _i, _j, _len, _len2, _ref, _ref2, _ref3;
hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {});
hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length;
- html = "
";
+ html = "
";
dialog = ui.dialog('options', {
top: '25%',
left: '25%'
@@ -1697,6 +1697,7 @@
code = $.config('time').replace(/%([A-Za-z])/g, function(s, c) {
switch (c) {
case 'a':
+ case 'A':
case 'b':
case 'B':
case 'd':
@@ -1715,6 +1716,7 @@
});
return time.funk = Function('time', "return '" + code + "'");
},
+ day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
zeroPad: function(n) {
if (n < 10) {
@@ -1724,7 +1726,10 @@
}
},
a: function() {
- return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][this.date.getDay()];
+ return this.day[this.date.getDay()].slice(0, 3);
+ },
+ A: function() {
+ return this.day[this.date.getDay()];
},
b: function() {
return this.month[this.date.getMonth()].slice(0, 3);
diff --git a/script.coffee b/script.coffee
index 47d95365c..26eea3c22 100644
--- a/script.coffee
+++ b/script.coffee
@@ -742,7 +742,8 @@ options =
Format specifiers (source)
| Specifier | Description | Values/Example |
- | %a | weekday, abbreviated | Fri |
+ | %a | weekday, abbreviated | Sat |
+ | %A | weekday, full | Saturday |
| %b | month, abbreviated | Jun |
| %B | month, full length | June |
| %d | day of the month, zero padded | 03 |
@@ -1360,9 +1361,18 @@ time =
foo: ->
code = $.config('time').replace /%([A-Za-z])/g, (s, c) ->
switch c
- when 'a', 'b', 'B', 'd', 'H', 'I', 'm', 'M', 'p', 'P', 'y' then "' + time.#{c}() + '"
+ when 'a', 'A', 'b', 'B', 'd', 'H', 'I', 'm', 'M', 'p', 'P', 'y' then "' + time.#{c}() + '"
else s
time.funk = Function 'time', "return '#{code}'"
+ day: [
+ 'Sunday'
+ 'Monday'
+ 'Tuesday'
+ 'Wednesday'
+ 'Thursday'
+ 'Friday'
+ 'Saturday'
+ ]
month: [
'January'
'February'
@@ -1378,15 +1388,8 @@ time =
'December'
]
zeroPad: (n) -> if n < 10 then '0' + n else n
- a: -> [
- 'Sun'
- 'Mon'
- 'Tue'
- 'Wed'
- 'Thu'
- 'Fri'
- 'Sat'
- ][@date.getDay()]
+ a: -> @day[@date.getDay()][...3]
+ A: -> @day[@date.getDay()]
b: -> @month[@date.getMonth()][...3]
B: -> @month[@date.getMonth()]
d: -> @zeroPad @date.getDate()