 parseDate = d3.time.format("%Y-%m-%d").parse
+
+formatDate = (date) ->
+  new Date(date.getFullYear(), date.getMonth(), date.getDate(), 11, 50, 50)
 
 $.get "api/entries", (data) ->
   data.forEach (d) ->

  ).dimension(dateDimension).group(hours).centerBar(true).gap(2).x(d3.time.scale().domain([
    minDate
    maxDate
  ])).round(d3.time.day.round).alwaysUseRounding(false).xUnits d3.time.days

  projectDimension = entries.dimension (data) -> data.project


    data.date

  hours = dateDimension.group().reduceSum(dc.pluck('hours'))
  minDate = formatDate(dateDimension.bottom(1)[0].date)
  maxDate = formatDate(dateDimension.top(1)[0].date)


  hoursChart  = dc.barChart("#chart-line-hoursperday")
  hoursChart.width(990).height(200).margins(
