Quick search by citation:

10 U.S. Code § 519 - Temporary enlistments: during war or emergency

Except as provided in section 505 of this title and except for enlistments as Reserves of an armed force—
temporary enlistments in an armed force entered into in time of war or of emergency declared by Congress shall be for the duration of the war or emergency plus six months; and
only persons at least eighteen years of age and otherwise qualified under regulations to be prescribed by the Secretary concerned are eligible for such enlistments.