Number of nights displaying as NAN in firefox