Spectral Theory for Nonlocal Dispersal with Periodic or Almost-Periodic Time Dependence