fixing toLocalFormart in js