The idiom is
to have [amount of time] to (do something).
It means that the action described by the final infinitive must be done within the amount of time allotted.
The students had one hour to complete the exam.
We have three months to install the kitchen cabinets.
Martha and Sam have only three days to prepare for the party.
Focus on just the amount of time. The amount of time can be
expressed in several additional ways with the help of prepositions like
since,
until,
from, and
to. These
prepositions are used to show the temporal boundaries of amounts of
time, so the amount of time is shown indirectly by mentioning the
beginning and/or ending of the time period. (If only one of the
two boundaries is mentioned, the other boundary normally defaults to
now.)
The students have had since last Thursday to finish the homework. (The amount of time is
from last Thursday until now.)
We have until March 17 to make a decision. (The amount of time is
from now until March 17.)
Martha and Sam have from Wednesday to the end of the week to buy the ingredients. (The amount of time is
from Wednesday to the end of the week.)
The words
before and
after are used differently. They specify
when
in time, usually with respect to a point in time as marked by some
event. In this way they are similar to expressions like
at 6 o'clock. They don't specify
how much time either directly (as in
one hour) or indirectly through time boundaries (as in
until tomorrow).
after the concert says
when (with respect to the time of the concert), not
how much time.
before sunset says
when (with respect to the time of sunset), not
how much time.
Consider what is wrong here:
*We have at 6 o'clock to finish the job. (at 6 o'clock is not an amount of time.)
*We have after Tuesday to decide on a plan.
(after Tuesday is not an amount of time.)
It is possible, although less usual, to combine the two sets of prepositions.
The men have had since before the end of last week to pave the road.
Sam and Yolanda have until after the 15th to send the invitations.
We will probably have until just before 7:15 to get to the box office and pick up the tickets.
Jack has from slightly after 8 until five minutes before 9 to clean the bedrooms.
I hope this helps.
CJ