Re: using perl to print yesterday's date, but with formatting options ?
- From: usenet@xxxxxxxxxxxxxxx
- Date: 1 Nov 2005 13:01:50 -0800
Purl Gurl wrote:
> All-in-all, you have yet to receive any intelligent responses
> regarding Daylight Savings Time.
>
> On Daylight Savings Time, you will never write code which
> will work correctly.
I beg to differ on both points. I posted this reply:
http://tinyurl.com/8uwwb. It works for daylight savings time, and leap
years, and Y10K, and years ending in "00" and it won't necessarily
break in Autumn of 2037, and everything else.
Simple:
use Date::Manip;
my $yesterday = UnixDate('yesterday', "%d.%m.%y");
If this solution does not meet the OP's requirements while avoiding the
pitfalls of cronowackiness, I'd like to know in what scenario it would
fail.
--
http://DavidFilmer.com
.
- Follow-Ups:
- References:
- Prev by Date: Re: FAQ 3.23 How can I get "#!perl" to work on [MS-DOS,NT,...]?
- Next by Date: Re: passing data
- Previous by thread: Re: using perl to print yesterday's date, but with formatting options ?
- Next by thread: Re: using perl to print yesterday's date, but with formatting options ?
- Index(es):