Extend get_last_attributes_values range to allow to give a limit date.
It will retrieve the last values up to this date.
Should we extend it more to accept negative values for n so that we could get the next values as well. Actually invert this logic, make negative values retrieve last values before, positive one the next values. We could have a generic function for this, possibly internal only, and get_last and get_next methods as fronts, any opinions?