develooper Front page | perl.datetime | Postings from January 2003

Re: Picking up the ball

Thread Previous | Thread Next
From:
David Wheeler
Date:
January 10, 2003 12:34
Subject:
Re: Picking up the ball
Message ID:
CE347EB0-24DA-11D7-B521-000393D9436A@wheeler.net
On Friday, January 10, 2003, at 02:13  AM, Dave Rolsky wrote:

>  my $order_d = Date::ICal->new( epoch => time );
>  printf( '%04d/%02d/%02d', $order_d->year, $order_d->month, 
> $order_d->day );
>  my $ship_d  = $order_d + Date::ICal::Duration->new( days => 5 );
>  printf( '%04d/%02d/%02d', $ship_d->year, $ship_d->month, $ship_d->day 
> );

One of the most important methods that Date::ICal is missing, IMO, and 
that we should grab from Time::Piece and put into the core, in my 
opinion, is strftime. I *love* that method!

   my $t = localtime;
   print $t->strftime("%Y/%m/%d");

David

-- 
David Wheeler                                     AIM: dwTheory
david@wheeler.net                                 ICQ: 15726394
http://david.wheeler.net/                      Yahoo!: dew7e
                                                Jabber: Theory@jabber.org


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About