When using this script, please only edit the section for the DRV you are currently closing. If you edit a larger section, such as for the whole date, the .split and .join commands will match in multiple places and cause some weirdness.
There's a test version of this script at /test.js for testing purposes. Please test any changes there before bringing them onto the live script page. It's set to show the "close" tab on User:Lifebaka/Sandbox/closedrv testing, so feel free to make any changes necessary to that page for testing.