The attacking nation can choose to remove themselves from the field of battle after 3 days but you have an option to continue it each day until 7 days. The wars expire after the usual 7 days.
If you remove yourself it costs 20X your infra level.
This way you can get out of a war against someone who has turtled. Also, the war could go to the full 7 days if you choose to smack someone down or it's an active war.
It's not like someone can slip into peace mode.