|
Prev: Will Perl 6 be usable as a procedure language?
Next: FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
From: Gunnar Hjalmarsson on 4 May 2008 18:00 Keith Keller wrote: > On 2008-05-04, Gunnar Hjalmarsson <noreply(a)gunnar.cc> wrote: >> Keith Keller wrote: >>> perl date formatting has nothing to do with UNIX date; %Y for example >>> is the hash named Y, and bears no relation at all to your call to >>> localtime. Read perldoc -f sprintf for valid formats (%Y is >>> certainly not one). >> >> Wouldn't it have been better to point the OP to POSIX::strftime() and >> drop that rant? > > Was I ranting? I thought I was just being complete. Thanks for the > pointer to POSIX::strftime; I seldom use the POSIX:: modules. The attempt to use the string '%Y%m%d-%H%M' in a date formating context told us that the OP was groping for strftime(). Considering that Owen had figured it out several hours before you posted, I found it not very fruitful to lead the OP away from that date formating method. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl |