Well, supposing you have dates and sqlite, as you mentioned before here is a possible approach:
select * from
(select * from d
where d <= '2013.01.07'
order by d desc
limit 6)
union
select * from
(select * from d
where d >= '2013.01.07'
order by d
limit 6)
It will select the eleven dates:
2013.01.02
2013.01.03
2013.01.04
2013.01.05
2013.01.06
2013.01.07
2013.01.08
2013.01.09
2013.01.10
2013.01.11
2013.01.12
It is not the cleanest, but it works.