 #   hubot forget my harvest account - Make hubot forget your Harvest credentials again
 #   hubot start harvest at <project>/<task>: <notes> - Start a Harvest timer at a given project-task combination
 #   hubot stop harvest [at project/task] - Stop the most recent Harvest timer or the one for the given project-task combination.
-#   hubot daily harvest [of <user>] - Show a user's Harvest timers for today (or yours, if noone is specified)
+#   hubot daily harvest [of <user>] [at yyyy-mm-dd] - Show a user's Harvest timers for today (or yours, if noone is specified) or a specific day
 #   hubot list harvest tasks [of <user>] - Show the Harvest project-task combinations available to a user (or you, if noone is specified)
 #   hubot is harvest down/up - Check if the Harvest API is reachable.
 # 

    msg.reply "Okay, I erased your credentials from my memory."

  # Retrieve your or a specific user's timesheet for today.
  robot.respond /daily harvest( of (.+))?/i, (msg) ->
    unless user = check_user(robot, msg, msg.match[2])
      return
    harvest = new HarvestService(user.harvest_account)

    try
      harvest.daily msg, (status, body) ->
        if 200 <= status <= 299
          msg.reply "Your entries for today, #{user.name}:"
          for entry in body.day_entries
            if entry.ended_at == ""
              msg.reply "• #{entry.project} (#{entry.client}) → #{entry.task} <#{entry.notes}> [running since #{entry.started_at} (#{entry.hours}h)]"
            else
              msg.reply "• #{entry.project} (#{entry.client}) → #{entry.task} <#{entry.notes}> [#{entry.started_at} – #{entry.ended_at} (#{entry.hours}h)]"
        else
          msg.reply "Request failed with status #{status}."
    catch error
      msg.reply("Fatal error: #{error}")


  # Issues /daily to the Harvest API.
  daily: (msg, callback) ->
    this.request(msg).path("/daily").get() (err, res, body) ->
      callback res.statusCode, JSON.parse(body)

  # Issues /daily/<dayofyear>/<year> to the Harvest API.
  daily_at: (msg, date, callback) ->
    this.request(msg).path("/daily/#{this.day_of_year(date)}/#{date.getFullYear()}").get() (err, res, body) ->
      callback res.statusCode, JSON.parse(body)

  # Issues /daily/add to the Harvest API to add a new timer
