better date checking
better date checking


Former-commit-id: 3d32d41bd7505a234f2b4759401edef47e8d1ac1 [formerly ca993f36b3a8f1ead598c4e2fa501d8d3dbc6a0d]
Former-commit-id: 36d9ec1569c2084b1059bf23f6b9e88e3fd4444d
andrewplummer/Sugar,romancow/Sugar,andrewplummer/Sugar,romancow/Sugar