The custom destination will strip the last three digits of the DID and route to your extensions.
To summarize, create a time group with the “Open” hours.
Create a time condition where destination matches is the Custom Destination you created and Destination non-Matches is the closed recording.
Keep in mind that if someone is there in the office after hours, they would not be able to get incoming calls. Likewise if someone is there after hours and calls 911 (or your country’s emergency code), you must have sent a number with the 911 call that can be called back. Create at least one incoming route that would have a number that the 911 center can call back on and that number should be presented to the 911 center on your outbound route for 911 calls.
You can get fancy and have an IVR for the closed destination that would play the closed announcement but secretly allow someone to dial your 3-digit extension number while the recording plays.
This is only one of many ways to handle this and I’m sure others will offer alternatives.