@@ 19,14 19,15 @@ function lang (el) {
function format (el, now) {
var dt = new Date(offset(el.dateTime))
+ var recent = now.getYear() == dt.getYear() && now.getMonth() == dt.getMonth()
var locale = lang(el)
var datestring = ''
var timestring = dt.toLocaleTimeString(locale, timeopts)
- if (now.getDate() - dt.getDate() == 0) {
+ if (recent && now.getDate() - dt.getDate() == 0) {
datestring = 'Today'
- } else if (now.getDate() - dt.getDate() == 1) {
+ } else if (recent && now.getDate() - dt.getDate() == 1) {
datestring = "Yesterday"
} else {
datestring = dt.toLocaleDateString(locale, dateopts)