     false
 
   # Returns the number of a day of the week from a supplied string. Will only attempt to match the first 3 characters
-
   getDayOfWeek = (day) ->
     days = ['sun', 'mon', 'tue', 'Wed', 'thu', 'fri', 'sat']
-    return days.indexOf(day.toLowercase().substring(0,3))
+    days.indexOf(day.toLowerCase().substring(0,3))
 
   # Returns all standups.
-
   getStandups = ->
     robot.brain.get('standups') or []
 
   # Returns just standups for a given room.
-
   getStandupsForRoom = (room) ->
     _.where getStandups(), room: room
 
   # Gets all standups, fires ones that should be.
-
   checkStandups = ->
     standups = getStandups()
     _.chain(standups).filter(standupShouldFire).pluck('room').each doStandup
     return
 
   # Fires the standup message.
-
   doStandup = (room) ->
     standups = getStandupsForRoom(room)
     if standups.length > 0

    room

  # Stores a standup in the brain.

  saveStandup = (room, time, location, utc) ->
    standups = getStandups()
    newStandup =
      time: time
      room: room
      utc: utc
      location: location
      day: day
    standups.push newStandup
    updateBrain standups
    return

  # Updates the brain's standup knowledge.

  updateBrain = (standups) ->
    robot.brain.set 'standups', standups
    return

  clearAllStandupsForRoom = (room) ->
    standups = getStandups()
    standupsToKeep = _.reject(standups, room: room)
    updateBrain standupsToKeep
    standups.length - (standupsToKeep.length)

  clearSpecificStandupForRoom = (room, time) ->
    standups = getStandups()
    standupsToKeep = _.reject(standups,
      room: room
      time: time)
    updateBrain standupsToKeep
    standups.length - (standupsToKeep.length)

  'use strict'
  # Constants.

#   Have Hubot remind you to do standups.
#   hh:mm must be in the same timezone as the server Hubot is on. Probably UTC.
#
#   This is configured to work for Hipchat. You may need to change the 'create
#   standup' command to match the adapter you're using.
#
# Configuration:
#  HUBOT_STANDUP_PREPEND
