Day trading (PDT) newbie question

What if a person buys a stock, and holds it for over at least one night. Then they sell all shares. If they buy some shares of that same stock later in that day, after closing their position earlier, is that considered to be a day trade (in regards to the PDT rule)? Or does the PDT only apply to short selling in regards to sell then buy?