in reply to Date formats

perl -MTime::Piece -le 'print localtime->strftime("%d/%m")'
Time::Piece makes this stuff easy, and understandable. Of course I'm biased :-)

Replies are listed 'Best First'.
Re: Re: Date formats
by blakem (Monsignor) on Jan 10, 2002 at 00:49 UTC
    Because I'm well on my way to becoming a Time::Piece convert, here it is used in a manner similiar to the other entries in this thread:
    #!/usr/bin/perl -wT use strict; use Time::Piece; my $t = localtime; my $date = sprintf("%02d/%02d",$t->mon,$t->mday); print "$date\n";

    -Blake