TomW: fix client side date logic to work correctly over year boundary(oops)