What I have mentioned above is the generic and most common form of use of these two terms..
There however is a difference in the usage of these terms by various shipping lines in various countries..
So, the line will charge the consignee DEMURRAGE for 4 days from 9th to 12th July at the rate fixed by the line..
After the full container has been picked up by the client, for example if they take another 7 days to return the empty container, then it is known as DETENTION which again will be charged at the rate fixed by the line..
Best option would be to check with the shipping line in your country how these terms are defined..
Imports – A container is discharged off a ship on the 2nd July – Consignee approaches the shipping line to take delivery of the cargo around 12th July..Working off a standard 7 free days from date of discharge, the line free days (different to port free days) expires on the 8th July..