actually a 61 day rule! "If caught" a loss [security sale] is disallowed if a substantial identical was purchased within 30 days before or after the date of sale.
The purpose is to prevent investors from making trades for the sole purpose of avoiding taxes.