This means that even if your trip will only last for a few weeks, the country will deny access if your passport expires in three months. This applies to either your date of entry or your date of departure. Passport validity dates vary on a country-by-country basis.