Javascript dates are a pain.