Excited-state dynamics of ethyl 4-(N,N-dimethylamino)benzoate and ethyl 4-(N,N-diethylamino)benzoate in apolar and polar solvents