 
   # render days based on whether they are past or upcoming
   # past days do not allow adding of plans
-  renderDays: (calendarDuration, referenceDay) ->
-    referenceDay ?= moment()
+  renderDays: (calendarDuration, referenceDate) ->
+    referenceDate ?= moment(TimeStore.getNow())
 
     durationDays = calendarDuration.iterate('days')
     days = []

BS = require 'react-bootstrap'

{Calendar, Month, Week, Day} = require 'react-calendar'

CourseCalendarHeader = require './header'
CourseDuration = require './duration'

    while durationDays.hasNext()
      dayIter = durationDays.next()

      if dayIter.isAfter(referenceDate, 'day')

        modifiers =
          upcoming: true
