I don't know if this is the right answer for what you want to do, but you can write a unix crontab file that will run your script once a day whenever you want. The dates you can parse out of localtime. It's not clear from your question what you want the script to do, other than get the date. If that's all you need, this should do it. The line below is a copy of a crontab file I use on my site to run a perl script that indexes my site every night for a search engine.
30 2 * * * /home/httpd/cgi-bin/perlfect/search/indexer.pl
Ignorance with Confidence