Tahor / Dam Sequence Calculator
Enter up to ten segments of purity (Tahor) and bleeding (Dam). Each segment consists of a type — either Tahor (period of purity) or Dam (days of blood) — and a number of days. When you click Calculate the script applies basic fiqh‑based rules from the example: purity periods shorter than 15 days between two blood segments are treated as part of the bleeding, and short bleeding periods themselves are absorbed into surrounding bleeding. The output shows the merged segments along with whether the blood is counted as menstruation (ḥaiḍ) or non‑menstrual bleeding (istiḥāḍa).