Bug with $dt-substract ??

2003-08-15 Thread Thomas Klausner
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

Re: Bug with $dt-substract ??

2003-08-15 Thread Dave Rolsky
On Fri, 15 Aug 2003, Thomas Klausner wrote: 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

Re: Bug with $dt-substract ??

2003-08-15 Thread Thomas Klausner
Hi! On Fri, Aug 15, 2003 at 12:53:56PM -0500, Dave Rolsky wrote: The results are actually consistent with the internal logic, but definitely surprising for end users. Surprising, indeed. If you add end_of_month = 'preserve' it does what you are wanting. Ah, after reading the docs more