for js date error