in reply to Re: Re: Adding to dates
in thread Adding to dates
So, just to expand a little on simeon2000's answer:
#! /usr/bin/perl use strict ; use warnings ; $|++ ; use constant WEEK => 60 * 60 * 24 * 7 ; my @later = localtime( time + ( WEEK * 2 ) ) ; my $fmt_date = sprintf "%04d-%02d-%02d", $later[5] + 1900, $later[4], $later[3] ; print $fmt_date, "\n" ; __END__
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche
|
|---|