The Shulchan Aruch · Orach Chayim
אורח חיים שמ״אOrach Chayim 341
Siman 341 of 697 in Orach Chayim — 3 se'ifim
הלכות שבתLaws of Shabbat· siman 341
Se’if 1א׳
מַתִּירִים נְדָרִים בְּשַׁבָּת אִם הֵם לְצֹרֶךְ הַשַּׁבָּת, כְּגוֹן שֶׁנָּדַר שֶׁלֹּא לֶאֱכֹל אוֹ שֶׁלֹּא לִשְׁתּוֹת, אַף עַל פִּי שֶׁהָיָה לוֹ פְּנַאי לְהַתִּירָם קֹדֶם הַשַּׁבָּת; אֲבָל הַבַּעַל יָכוֹל לְהָפֵר נִדְרֵי אִשְׁתּוֹ אֲפִלּוּ שֶׁאֵינָם לְצֹרֶךְ הַשַּׁבָּת, מִפְּנֵי שֶׁאִם לֹא יָפֵר לָהּ הַיּוֹם לֹא יוּכַל עוֹד לַהֲפִירָם.
Annulling Vows on Shabbat, 3 Seifim: We annul vows on Shabbat if the vows' content is relevant to a Shabbat necessity, like if someone vowed not to eat or drink. We do this even if he had the opportunity to annul them before Shabbat. The husband can annul his wife's vows even if they are not relevant to Shabbat, because if he does not annul them today, he will not ever be able to annul them.
Se’if 2ב׳
מִי שֶׁנִּשְׁבַּע לַעֲשׂוֹת מְלָאכָה פְּלוֹנִית עַד זְמַן פְּלוֹנִי, וְלֹא נִזְדַּמֵּן לוֹ לַעֲשׂוֹתָהּ עַד יוֹם הָאַחֲרוֹן שֶׁל אוֹתוֹ זְמַן וְאוֹתוֹ יוֹם בָּא בְּשַׁבָּת, וְיֵשׁ לוֹ פְּתָחִים לְהַתִּיר נִדְרוֹ, נִשְׁאָלִין אֲפִלּוּ בְּשַׁבָּת.
If someone swore to do some labor within some time period, and he had no chance to do it until the last day of the time period, if that last day is Shabbat and he has valid reasons to annul his vow, he may ask for its annulment even on Shabbat.
Se’if 3ג׳
נָהֲגוּ לְהַתִּיר חֶרְמֵי הַקָּהָל בְּשַׁבָּת אַף עַל פִּי שֶׁאֵינָם לְצֹרֶךְ הַשַּׁבָּת וְעַיֵּן לְעֵיל סוֹף סִימָן ש"ו.
It is the practice to annul vows in which the community swears off something even if the vow's content is not relevant to Shabbat (and see above at the end of chapter 306).
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0