Little fix of a javascript bug

When the user puts in target "&from=-2d" the javascript function getGoodUnit
returned "secondes" instead of "days"