With a five dimensional system of ordinary differential equations based on the SIR model, we consider the dynamics of epidemics in a community which consists of residents and visitors/tourists over a short period of time. The total population size of the community is taken to be constant, ignoring its change due to any birth and death in the period under consideration. Also, the resident and visitor populations are respectively constant. We assume that every immigrating visitor is susceptible and is likely to be infected during their stay in the community. Furthermore, infected visitors can carry on their activities normally during their stay in the community thus still appearing like susceptible visitors. From the analysis of the model, we obtained a threshold expected value of duration per visitor which determines whether an epidemic persists in the community or not. More so, the basic reproduction numbers with respect to the entire community as well as the resident and visitor populations are obtained and they can help us to formulate important public health policies in order to contain epidemics in the community.