  We investigate the cosmological implications of the generalized and extended
uncertainty principle (GEUP), and whether it could provide an explanation for
the dark energy. The consequence of the GEUP is the existence of a minimum and
a maximum length, which can in turn modify the entropy area law and also modify
the Friedmann equation. The cosmological consequences are studied by paying
particular attention to the role of these lengths. We find that the theory
allows a cosmological evolution where the radiation- and matter-dominated
epochs are followed by a long period of virtually constant dark energy, that
closely mimics the $\Lambda$CDM model. The main cause of the current
acceleration arises from the maximum length scale $\beta$, governed by the
relation $\Lambda\sim -\beta^{-1}W(-\beta^{-1})$. Using recent observational
data (the Hubble parameters, type Ia supernovae, and baryon acoustic
oscillations, together with the Planck or WMAP 9-year data of the cosmic
microwave background radiation), we estimate constraints to the minimum length
scale $\alpha \lesssim 10^{81}$ and the maximum length scale $\beta \sim
-10^{-2}$.
