Quick search by citation:

10 U.S. Code § 506 - Regular components: extension of enlistments during war

An enlistment in the Regular Army, Regular Navy, Regular Air Force, Regular Marine Corps, Regular Space Force, or Regular Coast Guard in effect at the beginning of a war, or entered into during a war, unless sooner terminated by the President, continues in effect until six months after the termination of that war.

Editorial Notes
Amendments

2021—Pub. L. 116–283 substituted “Regular Marine Corps, Regular Space Force,” for “Regular Marine Corps,”.

Statutory Notes and Related Subsidiaries
Transfer of Functions

For transfer of authorities, functions, personnel, and assets of the Coast Guard, including the authorities and functions of the Secretary of Transportation relating thereto, to the Department of Homeland Security, and for treatment of related references, see sections 468(b), 551(d), 552(d), and 557 of Title 6, Domestic Security, and the Department of Homeland Security Reorganization Plan of November 25, 2002, as modified, set out as a note under section 542 of Title 6.