Permalink
Browse files

smart days need to check if the date is actually in the future, other…

…wise 5 days ago becomes "Tomorrow"
  • Loading branch information...
1 parent be94534 commit 44eeb1f28bfd5817592d729f1c436384409074bd @kieran committed May 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 date.extensions.js
View
@@ -88,7 +88,7 @@
dayDiff = weekday - now.getDay();
if (dayDiff == 0) day = 'Today';
else if (dayDiff == -1) day = 'Yesterday';
- else if (dayDiff == 1) day = 'Tomorrow';
+ else if (dayDiff == 1 && date > now) day = 'Tomorrow';
else day = WEEKDAYS[weekday];
return day + " at " + date.toLocaleTimeString();
};

0 comments on commit 44eeb1f

Please sign in to comment.