Time-dependent solar modulation of cosmic rays from solar minimum to solar maximum