Transient evolution of weakly nonlinear sloshing waves: an analytical and numerical comparison