app/assets/javascripts/local_time.js.coffee in local_time-1.0.1 vs app/assets/javascripts/local_time.js.coffee in local_time-1.0.2

- old
+ new

@@ -139,19 +139,16 @@ "#{hr} hours" else null relativeWeekday: -> - daysPassed = @calendarDate.daysPassed() - - if daysPassed > 6 - null - else if daysPassed is 0 - "today" - else if daysPassed is 1 - "yesterday" - else - strftime @date, "%A" + switch @calendarDate.daysPassed() + when 0 + "today" + when 1 + "yesterday" + when 2,3,4,5,6 + strftime @date, "%A" formatDate: -> format = "%b %e" format += ", %Y" unless @calendarDate.occursThisYear() strftime @date, format