better handling of dates

Signed-off-by: Chris Warrick <kwpolska@gmail.com>