; and (B) the period by which monthly stipend is extended under section 3680(a)(2)(B) of this title. . (2) Applicability Subsection (d) of such section, as added by paragraph (1), shall apply with respect to courses and programs of education discontinued as described in subparagraph (A) or (B) of paragraph (2) of such subsection in fiscal year 2015 or any fiscal year thereafter. (b) Monthly housing stipend (1) In general Section 3680(a) of such title is amended— (A) by striking the matter after paragraph (3)(B); (B) in paragraph (3), by redesignating subparagraphs (A) and (B) as clauses (i) and (ii), respectively; (C) by redesignating paragraphs (1) through (3) as subparagraphs (A) through (C), respectively; (D) in the matter before subparagraph (A), as redesignated, in the first sentence, by striking Payment of and inserting (1) Except as provided in paragraph (2), payment of ; and (E) by adding at the end the following new paragraph (2): (2) Notwithstanding paragraph (1), the Secretary may, pursuant to such regulations as the Secretary shall prescribe, continue to pay allowances to eligible veterans and eligible persons enrolled in courses set forth in paragraph (1)(A)— (A) during periods when schools are temporarily closed under an established policy based on an Executive order of the President or due to an emergency situation, except that the total number of weeks for which allowances may continue to be so payable in any 12-month period may not exceed four weeks; or (B) solely for the purpose of awarding a monthly housing stipend described in section 3313 of this title, during periods following a permanent school closure, except that payment of such a stipend may only be continued until the earlier of— (i) the date of the end of the term, quarter, or semester during which the school closure occurred