buggy javascript with increase and decrease current date