At the beginning of the play, Theseus tells Hippolyta that they will marry in four days.
Theseus, Duke of Athens, is marrying Hippolyta, Queen of the Amazons. They met in battle, and apparently impressed one another. Early in the beginning of the play, Theseus notes that they will marry in four days.
Now, fair Hippolyta, our nuptial hour
Draws on apace; four happy days bring in
Another moon; but, O, methinks, how slow
This old moon wanes! (Act 1, Scene 1)
This sets the stage for the play. All of the action takes place in those four days, because the craftsmen are preparing for Pyramus and Thisbe, the play they will perform at the wedding.
All in all, everything ends well. Theseus and Hippolyta marry, and the lovers are correctly paired up and also marry on the same day. As silly and complicated as things get, they all work out in the end and everyone lives happily ever after.