Re: Comparing dates

2006-06-25 Thread John W. Krahn
ebony smith wrote: > I am new to perl and need to compare some dates in a file stored in > dd-mm- format to find out if the dates are greater than 30, 60 or 90 > days. > However, I am not quite sure how to go about doing that in perl and I > was wondering if anyone out there had any tips on how

Re: Comparing dates

2006-06-25 Thread Anthony Ettinger
Date::Calc On 6/25/06, ebony smith <[EMAIL PROTECTED]> wrote: I am new to perl and need to compare some dates in a file stored in dd-mm- format to find out if the dates are greater than 30, 60 or 90 days. However, I am not quite sure how to go about doing that in perl and I was wondering if

Comparing dates

2006-06-25 Thread ebony smith
I am new to perl and need to compare some dates in a file stored in dd-mm- format to find out if the dates are greater than 30, 60 or 90 days. However, I am not quite sure how to go about doing that in perl and I was wondering if anyone out there had any tips on how to do this. I extract

RE: Comparing Dates Conditional statements

2003-05-27 Thread Dan Muey
While using a module or a database's built in time/date functions would be best you can do it as a straight numeric comparison. But you must be very careful as to how you order those numbers or you'll get Improper results. # mmdd $foo = 20030101; $bar = 20021231; # can even add hours minutes

Re: Comparing Dates Conditional statements

2003-05-27 Thread Mark G
Mark G'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: "perl" <[EMAIL PROTECTED]> Sent: Tuesday, May 27, 2003 5:10 PM Subject: RE: Comparing Dates Conditional statements > > That won't work if the dates are more than a year apart(i.e. 100302 will

RE: Comparing Dates Conditional statements

2003-05-27 Thread Tim Johnson
ginal Message- From: Mark G [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 2:04 PM To: [EMAIL PROTECTED] Cc: perl Subject: Re: Comparing Dates Conditional statements > How can I have condition as such > > $date = 'XX/XX/XX'; <-insert any date > If $date is

Re: Comparing Dates Conditional statements

2003-05-27 Thread Mark G
g; if( $foo > $bar ){ print "\$foo is greater then \$bar \n"; } elsif( $foo == $bar){ print "\$foo is equal to \$bar \n"; } else { print "\$bar is greater then \$foo \n"; } <~~paste - Original Message - From: "Paul Kraus" <

Comparing Dates Conditional statements

2003-05-27 Thread Paul Kraus
How can I have condition as such $date = 'XX/XX/XX'; <-insert any date If $date is greater then 01/01/02 then do . Else Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: trouble comparing dates from two different modules

2002-07-24 Thread drieux
On Wednesday, July 24, 2002, at 09:05 , Ian Zapczynski wrote: [..] > What I'd *like* to do is stringify the output from both of these > functions, as they both return objects. Is this possible? If I do > something like: > > ($year,$month,$day) = Today(); > $yesterday = Add_Delta_Days($year,$mo

trouble comparing dates from two different modules

2002-07-24 Thread Ian Zapczynski
Hello all, I am using add_delta_workdays() from Date::Calendar to determine whether yesterday was or was not a business day. In order to do this, I am trying to compare it with a date output from Add_Delta_Days from Date::Calc. What I'd *like* to do is stringify the output from both of these fu

trouble comparing dates from two different modules

2002-07-24 Thread Ian Zapczynski
Hello all, I am using add_delta_workdays() from Date::Calendar to determine whether yesterday was or was not a business day. In order to do this, I am trying to compare it with a date output from Add_Delta_Days from Date::Calc. What I'd *like* to do is stringify the output from both of these fu

Re: comparing dates

2002-01-07 Thread John W. Krahn
Alex Harris wrote: > > if I use the following to get the date of a file: > use File::stat; > use Time::localtime; > $date_string = ctime(stat($file)->mtime); > print "file $file updated at $date_string\n"; > > I get: >Mon Jan 7 10:21:21 2002 > > Now I want to compare anothe

RE: comparing dates

2002-01-07 Thread Yacketta, Ronald
how about converting the times to epoch time and then compare? have a look at timelocal to convert to epoch time > -Original Message- > From: Alex Harris [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 07, 2002 11:38 > To: [EMAIL PROTECTED] > Subject:

Re: comparing dates

2002-01-07 Thread Matt C.
Check out Date::Manip; it can do just about anything you'd need to do with dates. If speed is of great concern (I use Date::Manip and it performs fine), you may be able to find another Date::* module more specifically tuned to your needs. Definitely try Date::Manip first though, as it will work

comparing dates

2002-01-07 Thread Alex Harris
if I use the following to get the date of a file: use File::stat; use Time::localtime; $date_string = ctime(stat($file)->mtime); print "file $file updated at $date_string\n"; I get: Mon Jan 7 10:21:21 2002 Now I want to compare another file date to this one getting the date