The Hadith is simple and clear. And it is timeless.
The Hadith says, what I am paraphrasing here, when a certain place is known to be affected by an epidemic of some kind, no one should go in or out of that place.
This is quarantine, no matter how you spell it.
And this was 1400 years ago.