Hamas agrees to daylong cease-fire; Israel says it was violated