Clarifying a couple of comments
Adding detailed comments to test

This logic took me ages to work out so I've added some extremely detailed documentation to the fixture. This is not the right thing to do or the right place to do it - the code and tests should be refactored so this logic is clear from reading the tests; however, I do not want to make too many changes at once so this will do for now.
Add first test of logic I think is wrong
Adding more tests
Tests now fail correctly

As in, this is the result I expect
Removing errant +1

I can't see why this +1 has been added. The work it is doing means we include
the current time period. Pending more complex logic for handling this (to allow
users to enter data for previous time periods but not current time period) I do
not think we should collect data for the current time period.
Fix three failing tests

These three were failing because the latest time period was not being returned.
Have fixed them therefore by setting the start date one day earlier.
More earlier start dates

Fixed a couple more tests by setting the start date to yesterday. The sceond one
here, test_record_get now may not quite make sense because how can you record
data if it's not on the view screen? But I don't think this matters right now.
Changed start date and record date...

...but there is probably a better way of doing this. I think it still tests what
it's meant to test, but you might want to take a look.
Updating lengthy comment now I've changed logic
Merge pull request #42 from devfort/week_habits

We shouldn't try and collect data from the future

I have finally got behabitual working locally and it works fine, so I'm going to merge and deploy this change. Yes, merging my own pull requests. http://wheningit.tumblr.com/post/25796306185/when-i-merge-my-own-pull-requests