Re: PDF Javascript
Brendon Oliver <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.pdfapi2 |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 9 Aug 2007 09:58:57 pm Ben wrote:
> sub tdate {
> @_ = localtime(shift || time);
> return(sprintf("%02d:%02d %02d/%02d/%04d", @_[2,1], $_[4]+1, $_[3],
> $_[5]+1900)); }
If you're not overly particular about the date format, simply:
return scalar localtime(shift || time);
is much better ;-)
Beats trying to stuff localtime() into sprintf IMHO :-)
cheers,
- B.