Israel and Hamas appeared open to extending a cease-fire in Gaza that has halted their deadliest and most destructive war but is set to expire after Monday, with a fourth exchange of militant-held hostages for Palestinians imprisoned by Israel planned for later in the day.