We have evaluated the electron capture rates on 20Ne, 20F, 24Mg, 24Na and the β decay rates for 20F and 24Na at temperature and density conditions relevant for the late-evolution stages of stars with M=8-12 M⊙. The rates are based on recent experimental data and large-scale shell model calculations. We show that the electron capture rates on 20Ne, 24Mg and the 20F, 24Na β-decay rates are based on data in this astrophysical range, except for the capture rate on 20Ne, which we predict to have a dominating contribution from the second-forbidden transition between the 20Ne and 20F ground states in the density range logρYe(gcm−3)=9.3-9.6. The dominance of a few individual transitions allows us to present the various rates by analytical expressions at the relevant astrophysical conditions. We also derive the screening corrections to the rates.