Sahih al Bukhari 971
The Two Festivals (Eids)
حَدَّثَنَا مُحَمَّدٌ، حَدَّثَنَا عُمَرُ بْنُ حَفْصٍ، قَالَ حَدَّثَنَا أَبِي، عَنْ عَاصِمٍ، عَنْ حَفْصَةَ، عَنْ أُمِّ عَطِيَّةَ، قَالَتْ كُنَّا نُؤْمَرُ أَنْ نَخْرُجَ يَوْمَ الْعِيدِ، حَتَّى نُخْرِجَ الْبِكْرَ مِنْ خِدْرِهَا، حَتَّى نُخْرِجَ الْحُيَّضَ فَيَكُنَّ خَلْفَ النَّاسِ، فَيُكَبِّرْنَ بِتَكْبِيرِهِمْ، وَيَدْعُونَ بِدُعَائِهِمْ يَرْجُونَ بَرَكَةَ ذَلِكَ الْيَوْمِ وَطُهْرَتَهُ.
Narrated Um `Atiya:We used to be ordered to come out on the Day of `Id and even bring out the virgin girls from their houses and menstruating women so that they might stand behind the men and say Takbir along with them and invoke Allah along with them and hope for the blessings of that day and for purification from sins
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.