1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 11:32:20 -05:00

Use day numbers instead of text for language independent day name fuzzyness.

This commit is contained in:
JackDandy 2014-06-07 02:39:17 +01:00
parent 08159e2872
commit 02ecb18eff

View File

@ -113,10 +113,10 @@
result = (0 == week ? airdatetime.calendar() : ''); result = (0 == week ? airdatetime.calendar() : '');
if (/\bOn\b/i.test(result)) { if (/\bOn\b/i.test(result)) {
var fuzzer = false, weekday = today.format('dd'); var fuzzer = false, weekday = today.day();
if (/we/i.test(weekday)) if (3 == weekday)
fuzzer = (5 <= day); fuzzer = (5 <= day);
else if (/(?:th|fr)/i.test(weekday)) else if (4 == weekday || 5 == weekday)
fuzzer = (4 <= day); fuzzer = (4 <= day);
else else
fuzzer = (6 == day); fuzzer = (6 == day);