The main difficulty seems to be that you are not recording and storing the initial opening date/time. You will have to store this date somewhere, either in the document or in a global variable. The problem with storing it in the document is the modified document would have to be saved by the user, which may not happen. So that leaves using a global variable.
Your code could first check for the existence of the global variable that you set up for this, and if it doesn't exists, create it, set its value to the current date/time, and set it to be persistent. You do this with the global.setPersistent method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.778.html
Read up on the other information on the global object in the documentation.
You then just need to compare the current date to this stored date whenever the document is opened. If the difference exceeds 24 hours, oyu cna close the document using the doc.closeDoc method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.448.html
Here's a little information on date arithmetic: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_Dev_AcrobatForms.76.35.ht ml
And you should be able to find more with a search.
Again, this can't be considered secure or robust, but it may be sufficient for your needs.