Judges 11:30-39 English Standard Version (ESV)
30 And Jephthah made a vow to the Lord and said, “If you will give the Ammonites into my hand, 31 then whatever[a] comes out from the doors of my house to meet me when I return in peace from the Ammonites shall be the Lord's, and I will offer it[b] up for a burnt offering.” 32 So Jephthah crossed over to the Ammonites to fight against them, and the Lord gave them into his hand. 33 And he struck them from Aroer to the neighborhood of Minnith, twenty cities, and as far as Abel-keramim, with a great blow. So the Ammonites were subdued before the people of Israel.
34 Then Jephthah came to his home at Mizpah. And behold, his daughter came out to meet him with tambourines and with dances. She was his only child; besides her he had neither son nor daughter. 35 And as soon as he saw her, he tore his clothes and said, “Alas, my daughter! You have brought me very low, and you have become the cause of great trouble to me. For I have opened my mouth to the Lord, and I cannot take back my vow.” 36 And she said to him, “My father, you have opened your mouth to the Lord; do to me according to what has gone out of your mouth, now that the Lord has avenged you on your enemies, on the Ammonites.” 37 So she said to her father, “Let this thing be done for me: leave me alone two months, that I may go up and down on the mountains and weep for my virginity, I and my companions.” 38 So he said, “Go.” Then he sent her away for two months, and she departed, she and her companions, and wept for her virginity on the mountains. 39 And at the end of two months, she returned to her father, who did with her according to his vow that he had made. She had never known a man, and it became a custom in Israel
Judges 11:30-39 New International Version (NIV)
30 And Jephthah made a vow to the Lord: “If you give the Ammonites into my hands, 31 whatever comes out of the door of my house to meet me when I return in triumph from the Ammonites will be the Lord’s, and I will sacrifice it as a burnt offering.”
32 Then Jephthah went over to fight the Ammonites, and the Lord gave them into his hands. 33 He devastated twenty towns from Aroer to the vicinity of Minnith, as far as Abel Keramim. Thus Israel subdued Ammon.
34 When Jephthah returned to his home in Mizpah, who should come out to meet him but his daughter, dancing to the sound of timbrels! She was an only child. Except for her he had neither son nor daughter. 35 When he saw her, he tore his clothes and cried, “Oh no, my daughter! You have brought me down and I am devastated. I have made a vow to the Lord that I cannot break.”
36 “My father,” she replied, “you have given your word to the Lord. Do to me just as you promised, now that the Lord has avenged you of your enemies, the Ammonites. 37 But grant me this one request,” she said. “Give me two months to roam the hills and weep with my friends, because I will never marry.”
38 “You may go,” he said. And he let her go for two months. She and her friends went into the hills and wept because she would never marry. 39 After the two months, she returned to her father, and he did to her as he had vowed. And she was a virgin.
From this comes the Israelite tradition