Merge pull request #590 from JackDandy/FuzzyMomentsLang

Small fuzzy moments update: Use day numbers instead of lang dependant names
This commit is contained in:
Nils 2014-06-09 00:20:07 +02:00
commit 813fd0d98a

View file

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