The first day the holder of a physically delivered contract can be told to take delivery.
For gold and Treasury futures it falls at the end of the month before the contract month. Retail brokers usually require you to close or roll before it, and may do it for you.
Why gold and bonds roll early →