While helping out on a Perl message board recently, I posted some code to create a select box of dates. I used davorg's module Calendar::Simple, and it worked really well, for what the question posted wanted.
After a little while, I looked back over the code, and realised two things. Firstly I'd actually made it alot more longwinded than necessary, and secondly there is quite a module to built around it.
So now I have the beginnings of Calendar::List, which will export DateList() and DateSelect(). The former will return either an array or hash based on its parameters, while the second will return a string containing a completed HTML Select Box code snippet. You'll be able to pass a hash of settings to each, which will do all sorts of fun things like preset start/end dates, ignore weekends, limit the number of options, etc. Hopefully I'll have something decent to initially realse in a couple of weeks.
Re:Sub Names
barbie on 2003-04-30T07:26:44
I was trying to avoid a long name, as really it should be CalendarSelectBox. Then again perhaps that isn't too long.