 
     advanceDate: (direction) =>
         calendarInner = @calendar.find "div.#{@calendarInnerClass}"
-        currentMonth = calendarInner.data 'month'
-        currentYear = calendarInner.data 'year'
-        nextYear = currentYear + 1
-        lastYear = currentYear - 1
-        nextMonth = if currentMonth is 11 then 0 else currentMonth + 1
-        lastMonth = if currentMonth is 0 then 11 else currentMonth - 1
-        currentDate = calendarInner.find(".#{@classes.date}").data 'date'
+        currentDate =
+            month: calendarInner.data 'month'
+            date: calendarInner.find(".#{@classes.date}").data 'date'
+            year: calendarInner.data 'year'
+        nextYear = currentDate.year + 1
+        lastYear = currentDate.year - 1
+        nextMonth = if currentDate.month is 11 then 0 else currentDate.month + 1
+        lastMonth = if currentDate.month is 0 then 11 else currentDate.month - 1
         
         if direction is 'prev'
-            lastDayOfPrevMonth = @getDaysInMonth lastMonth, currentYear
-
-            if currentDate is 1
-                currentDate = lastDayOfPrevMonth
-                currentYear = if currentMonth is 0 then lastYear else currentYear
-                currentMonth = lastMonth
+            lastDayOfPrevMonth = @getDaysInMonth lastMonth, currentDate.year
+
+            if currentDate.date is 1
+                currentDate.date = lastDayOfPrevMonth
+                currentDate.year = if currentDate.month is 0 then lastYear else currentDate.year
+                currentDate.month = lastMonth
             else
-                currentDate = currentDate - 1
+                currentDate.date = currentDate.date - 1
 
         else if direction is 'next'
-            lastDayOfMonth = @getDaysInMonth currentMonth, currentYear
-
-            if currentDate is lastDayOfMonth
-                currentDate = 1
-                currentYear = if currentMonth is 11 then nextYear else currentYear
-                currentMonth = nextMonth
+            lastDayOfMonth = @getDaysInMonth currentDate.month, currentDate.year
+
+            if currentDate.date is lastDayOfMonth
+                currentDate.date = 1
+                currentDate.year = if currentDate.month is 11 then nextYear else currentDate.year
+                currentDate.month = nextMonth
             else
-                currentDate = currentDate + 1
-
-        if @view is 'date' then @changeCalendar currentMonth, currentDate, currentYear
+                currentDate.date = currentDate.date + 1
+
+        if @view is 'date' then @changeCalendar currentDate
 
     advanceWeek: (direction) =>
         calendarInner = @calendar.find "div.#{@calendarInnerClass}"
-        currentMonth = calendarInner.data 'month'
-        currentYear = calendarInner.data 'year'
-        nextYear = currentYear + 1
-        lastYear = currentYear - 1
-        nextMonth = if currentMonth is 11 then 0 else currentMonth + 1
-        lastMonth = if currentMonth is 0 then 11 else currentMonth - 1
+        currentDate =
+            month: calendarInner.data 'month'
+            date: 1
+            year: calendarInner.data 'year'
+        nextYear = currentDate.year + 1
+        lastYear = currentDate.year - 1
+        nextMonth = if currentDate.month is 11 then 0 else currentDate.month + 1
+        lastMonth = if currentDate.month is 0 then 11 else currentDate.month - 1
         
         if direction is 'prev'
             firstDay = calendarInner.find(".#{@classes.date}").first().data 'date'
-            lastDayOfPrevMonth = @getDaysInMonth lastMonth, currentYear
+            lastDayOfPrevMonth = @getDaysInMonth lastMonth, currentDate.year
 
             if firstDay is 1 and @view is 'week'
-                currentDate = lastDayOfPrevMonth
-                currentYear = if currentMonth is 0 then lastYear else currentYear
-                currentMonth = lastMonth
+                currentDate.date = lastDayOfPrevMonth
+                currentDate.year = if currentDate.month is 0 then lastYear else currentDate.year
+                currentDate.month = lastMonth
             else if firstDay < 7 and @view is 'week'
-                currentDate = firstDay - 1
+                currentDate.date = firstDay - 1
             else if firstDay is 1 and @view is 'date'
-                currentDate = lastDayOfPrevMonth - 6 # 30 - 6 1 24
-                currentYear = if currentMonth is 0 then lastYear else currentYear
-                currentMonth = lastMonth
+                currentDate.date = lastDayOfPrevMonth - 6 # 30 - 6 1 24
+                currentDate.year = if currentDate.month is 0 then lastYear else currentDate.year
+                currentDate.month = lastMonth
             else if firstDay < 7 and @view is 'date'
-                currentDate = lastDayOfPrevMonth - (7 - firstDay) # 31 - (7 - 3) = 27 27  28 - (7 - 6) = 27 6 27
-                currentYear = if currentMonth is 0 then lastYear else currentYear
-                currentMonth = lastMonth
+                currentDate.date = lastDayOfPrevMonth - (7 - firstDay) # 31 - (7 - 3) = 27 27  28 - (7 - 6) = 27 6 27
+                currentDate.year = if currentDate.month is 0 then lastYear else currentDate.year
+                currentDate.month = lastMonth
             else
-                currentDate = firstDay - 7
+                currentDate.date = firstDay - 7
 
         else if direction is 'next'
             lastDay = calendarInner.find(".#{@classes.date}").last().data 'date'
-            lastDayOfMonth = @getDaysInMonth currentMonth, currentYear
+            lastDayOfMonth = @getDaysInMonth currentDate.month, currentDate.year
 
             if lastDay is lastDayOfMonth and @view is 'week'
-                currentDate = 1
-                currentYear = if currentMonth is 11 then nextYear else currentYear
-                currentMonth = nextMonth
+                currentDate.date = 1
+                currentDate.year = if currentDate.month is 11 then nextYear else currentDate.year
+                currentDate.month = nextMonth
             else if (lastDay + 7 > lastDayOfMonth) and @view is 'week'
-                currentDate = lastDayOfMonth
+                currentDate.date = lastDayOfMonth
             else if (lastDay + 7 > lastDayOfMonth) and @view is 'date'
-                currentDate = 7 - (lastDayOfMonth - lastDay) # 31 - 29 = 2 then 7 - 2 = 5
-                currentYear = if currentMonth is 11 then nextYear else currentYear
-                currentMonth = nextMonth
+                currentDate.date = 7 - (lastDayOfMonth - lastDay) # 31 - 29 = 2 then 7 - 2 = 5
+                currentDate.year = if currentDate.month is 11 then nextYear else currentDate.year
+                currentDate.month = nextMonth
             else
-                currentDate = lastDay + 7
-
-        if @view is 'date' or @view is 'week' then @changeCalendar currentMonth, currentDate, currentYear
+                currentDate.date = lastDay + 7
+
+        if @view is 'date' or @view is 'week' then @changeCalendar currentDate
 
     advanceMonth: (direction) =>
+        self = @
         calendarInner = @calendar.find "div.#{@calendarInnerClass}"
-        currentMonth = calendarInner.data 'month'
-        currentYear = calendarInner.data 'year'
-        currentDate = if currentMonth is self.currentMonth then self.currentDate else 1
+        currentDate =
+            month: calendarInner.data 'month'
+            date: if @month is self.today.month then self.today.date else 1
+            year: calendarInner.data 'year'
         
         if direction is 'prev'
-            currentMonth = if currentMonth is 0 then 11 else currentMonth - 1
-            currentYear = if currentMonth is 11 then currentYear - 1 else currentYear
+            currentDate.month = if currentDate.month is 0 then 11 else currentDate.month - 1
+            currentDate.year = if currentDate.month is 11 then currentDate.year - 1 else currentDate.year
         else if direction is 'next'
-            currentMonth = if currentMonth is 11 then 0 else currentMonth + 1
-            currentYear = if currentMonth is 0 then currentYear + 1 else currentYear
-        @changeCalendar currentMonth, currentDate, currentYear
+            currentDate.month = if currentDate.month is 11 then 0 else currentDate.month + 1
+            currentDate.year = if currentDate.month is 0 then currentDate.year + 1 else currentDate.year
+        @changeCalendar currentDate
 
     advanceYear: (direction) =>
+        self = @
         calendarInner = @calendar.find "div.#{@calendarInnerClass}"
-        currentMonth = calendarInner.data 'month'
-        currentYear = calendarInner.data 'year'
-        currentDate = if currentMonth is self.currentMonth then self.currentDate else 1
+        currentDate =
+            month: calendarInner.data 'month'
+            year: calendarInner.data 'year'
+
+        currentDate.date = if currentDate.month is self.today.month then self.today.date else 1
+        currentDate.year = if direction is 'prev' then currentDate.year - 1 else currentDate.year + 1
         
-        if direction is 'prev' then currentYear = currentYear - 1 else currentYear = currentYear + 1
-        
-        @changeCalendar currentMonth, currentDate, currentYear
+        @changeCalendar currentDate
 
     changeCalendarView: (view) =>
-        calendar = $ ".#{@calendarInnerClass}"
-        currentMonth = calendar.data 'month'
-        currentYear = calendar.data 'year'
-        currentDate = if currentMonth is @currentMonth then @currentDate else 1
+        self = @
+        calendarInner = @calendar.find "div.#{@calendarInnerClass}"
+        currentDate =
+            month: calendarInner.data 'month'
+            year: calendarInner.data 'year'
+
+        currentDate.date = if currentDate.month is self.today.month then self.today.date else 1     
+
         # update view
         @view = view
-        @changeCalendar currentMonth, currentDate, currentYear
+        @changeCalendar currentDate
         # change calendar class
         @calendarInnerClass = "drm-calendar-#{view}-view"
         @calendarInnerClass
 
-    changeCalendar: (month, date, year) =>
+    changeCalendar: (currentDate) =>
         self = @
         calendarInner = self.calendar.find "div.#{self.calendarInnerClass}"
         calendarInner.fadeOut(300).queue (next) ->
-            $.when(calendarInner.remove()).then(self.createCalendar(month, date, year))
+            $.when(calendarInner.remove()).then(self.createCalendar(currentDate))
             next()
 
-    createCalendar: (currentMonth, currentDate, currentYear) =>
+    createCalendar: (currentDate) =>
         self = @
-        nextYear = currentYear + 1
-        lastYear = currentYear - 1
-        nextMonth = if currentMonth is 11 then 0 else currentMonth + 1
-        lastMonth = if currentMonth is 0 then 11 else currentMonth - 1
-        firstDay = self.getDayOfWeek currentMonth, 1, currentYear
+        nextYear = currentDate.year + 1
+        lastYear = currentDate.year - 1
+        nextMonth = if currentDate.month is 11 then 0 else currentDate.month + 1
+        lastMonth = if currentDate.month is 0 then 11 else currentDate.month - 1
+        firstDay = self.getDayOfWeek currentDate.month, 1, currentDate.year
         dayShift = if firstDay is self.daysPerWeek then 0 else firstDay
-        numberDays = self.getDaysInMonth currentMonth, currentYear
-        numberWeeks = self.getWeeksInMonth currentMonth, currentYear
-        prevMonthNumberDays = self.getDaysInMonth lastMonth, currentYear
-        weekInfo = self.getDatesInWeek currentMonth, currentDate, currentYear
+        numberDays = self.getDaysInMonth currentDate.month, currentDate.year
+        numberWeeks = self.getWeeksInMonth currentDate.month, currentDate.year
+        prevMonthNumberDays = self.getDaysInMonth lastMonth, currentDate.year
+        weekInfo = self.getDatesInWeek currentDate.month, currentDate.date, currentDate.year
         datesInWeek = weekInfo.datesInWeek
-        weekNumber = self.getWeekNumber currentMonth, currentDate, currentYear
+        weekNumber = self.getWeekNumber currentDate.month, currentDate.date, currentDate.year
         weekClass = if weekNumber % 2 is 0 then 'even-week' else 'odd-week'
-        day = self.getDayOfWeek currentMonth, currentDate, currentYear
+        day = self.getDayOfWeek currentDate.month, currentDate.date, currentDate.year
 
         _highlightWeekends = ->
             calendarInner = self.calendar.find "div.#{self.calendarInnerClass}"


            self.calendar.on 'click', '.drm-calendar-current', ->
                # go to today's date
                self.changeCalendar.call @, self.currentMonth, self.currentDate, self.currentYear

            self.calendar.on 'click', '.drm-calendar-select button[type=submit]', (e) ->
                # go to a specific date

            self.body = $ 'body'
            self.daysPerWeek = 7
            self.events = []
            self.now = new Date()
            self.today =
                month: self.now.getMonth()
                date: self.now.getDate()
                year: self.now.getFullYear()
            self.calendarInnerClass = "drm-calendar-#{self.view}-view"
            self.calendarNav = $ '.drm-calendar-nav'
            self.calendarSelect = $ '.drm-calendar-select'
