Hi!

I'm getting strange results when subtracting dates from one another:

I make a new $dt object, setting the date to e.g. 2003-05-31. If I subtract
one month, I do not get 2003-04-30, but 2005-05-01, which seems wrong to me.

This problem only occurs in months with 31 days, exept August, which works.

March gives even stranger results.

I attached a small script illustrating the problem.

It's either a bug (if it is I could try to track it down more closely), or
I'm doing something dumb (in which case I'd appreciate some advice...)

I'm using DateTime-0.1601 and perl.5.8.0

-- 
#!/usr/bin/perl                               http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

Attachment: bug.pl
Description: Perl program

Reply via email to