now splits correctly in today and history

date logic fix.
fixes #4.