use +date rather than date.valueOf()