Integrability in time-dependent systems with one degree of freedom