Hi,

could anybody help me to get the following test run? The law (interest
rate calculations) says that it is exactly 1 month and 0 days from 2-28
till 3-30. Any suggestions?

 {
      DateMidnight begin = new DateMidnight( 2008, 2, 15 );
      DateMidnight end = new DateMidnight( 2008, 3, 15 );

      Period period = new Period( begin, end, PeriodType.yearMonthDay() );
      assertEquals( 1, period.getMonths() );
      assertEquals( 0, period.getDays() );
    }

    {
      DateMidnight begin = new DateMidnight( 2008, 2, 28 );
      DateMidnight end = new DateMidnight( 2008, 3, 30 );

      Period period = new Period( begin, end, PeriodType.yearMonthDay() );
      assertEquals( 1, period.getMonths() );
      assertEquals( 0, period.getDays() );
    }



Regards,

Johannes Schneider

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to