On May 13, Harry Putnam said:
>Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes:
>
>> On May 13, Harry Putnam said:
>>
>>>Is there a date manipulation module that does the same thing as gnu
>>>`date -d' command? That is, given a spec string, it returns a date in
>>>the past in user selected format.
Bob Showalter <[EMAIL PROTECTED]> writes:
> Or, you can use something like Date::Manip which handles the '2 weeks ago'
> type of expressions. It has its own UnixDate function that is similar to
> POSIX::strftime.
Aha... now we're talking. Date::Manip is what I was after:
cat test.pl:
#!/usr/
Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes:
> On May 13, Harry Putnam said:
>
>>Is there a date manipulation module that does the same thing as gnu
>>`date -d' command? That is, given a spec string, it returns a date in
>>the past in user selected format.
>>
>>Like what gnu `date' would do wi
Harry Putnam wrote:
> Group,
>
> Is there a date manipulation module that does the same thing as gnu
> `date -d' command? That is, given a spec string, it returns a date in
> the past in user selected format.
>
> Like what gnu `date' would do with:
> date -d '-2 weeks' +"%m%d%Y_%T"
> 042920
On May 13, Harry Putnam said:
>Is there a date manipulation module that does the same thing as gnu
>`date -d' command? That is, given a spec string, it returns a date in
>the past in user selected format.
>
>Like what gnu `date' would do with:
> date -d '-2 weeks' +"%m%d%Y_%T"
> 04292004_13:20
On Feb 10, 2004, at 4:21 AM, Roger Grosswiler wrote:
hi list,
Hello.
i'd like to try a first perl-script that should:
-define todays date
print localtime(), "\n";
-define todays date minus one week
print localtime( time - 60 * 60 * 24 * 7 ), "\n"; # depending on how
you define "week"
-find in
On Tue, Feb 10, 2004 at 11:21:15AM +0100, Roger Grosswiler ([EMAIL PROTECTED]) wrote:
> hi list,
>
> i'd like to try a first perl-script that should:
>
> -define todays date
> -define todays date minus one week
> -find in a special directory files, that contain ddmmyy
> -remove them
>
> ..since
Roger Grosswiler wrote:
>But: how can i find out the Systems-Date with Perl? Which format has
>it? Is there a perlman-page? (I was looking, but didn't find...)
>
perldoc -f localtime
HTH,
Jan
--
There's no place like ~/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-ma
From: "Roger Grosswiler" <[EMAIL PROTECTED]>
Subject: Date manipulation
Date: Tue, 10 Feb 2004 11:21:15 +0100 (CET)
> hi list,
>
> i'd like to try a first perl-script that should:
>
> -define todays date
> -define todays date minus one week
> -find in a special directory files, that contain ddmm
David Samuelsson (PAC) wrote:
> I have an nice script that lest me list stuff from a certian date in
> time. It based on:
>
> DD-MON-YY (say 01-jan-03) that will be from the first of january. I
> am trying to add more functionality to the script. I need a function
> where i get an variable $days
Use Date::Parse and Date::Format, it works much the same way. It is part of
the TimeDate package on CPAN.
use Date::Parse;
use Date::Format;
$date = time2str("%Y-%m-%d", str2time("22-January-2002"))'
Rob
-Original Message-
From: Lysander [mailto:[EMAIL PROTECTED]]
Sent: Friday, Janu
Suru Dissanayake wrote:
>
> Hi Perl mailing list!
>
> I have a small dilemma; I want to manipulate a date.
> For example if I have the date ? 2001-11-15 16:22:00?
> I would like to get the previous day, week, month and year in a easy way.
> Is there a module that handles this kind of manipulatio
12 matches
Mail list logo