   time += date.getMinutes()
   if date.getFullYear() == now.getFullYear() and not absolute
     if date.getMonth() == now.getMonth() and date.getDate() == now.getDate()
+      Session.get 'today'  # depend on the current date; see below
       "today at #{time}"
     else
       now.setDate now.getDate()-1
       if date.getMonth() == now.getMonth() and date.getDate() == now.getDate()
+        Session.get 'today'  # depend on the current date; see below
         "yesterday at #{time}"
       else
         "#{prefix}#{date.toLocaleDateString 'en-US', options} at #{time}"


Template.registerHelper 'formatDate', (date, kw) ->
  formatDate date, kw?.hash?.prefix

@formatDate = (date, prefix = '', absolute) ->
  return '???' unless date?
  return "?#{date}?" unless date instanceof Date  ## have seen this briefly, not sure when
  now = new Date
  options =
    weekday: 'short'
    month: 'short'
