Hi,

how is it possible to calculate the end of a month with respect to a calendar.

I used something like this:

LocalDate marchEnd = new LocalDate("2008-03-31");
Period monthPeriod = new Period.months(1);
LocalDate febEnd = marchEnd.minus(monthPeriod); // Results into 29.02.2008
LocalDate janEnd = febEnd.minus(monthPeriod);  // Results into 29.01.2008

I was expecting the 31.1.2008.

How is it possible to decrease by a period of one month and receive always the correct end of month day?

Regards
Andreas
begin:vcard
fn:Andreas Rudolf
n:Rudolf;Andreas
adr:;;Finkenweg 76;Linz;;53545;Deutschland
email;internet:[EMAIL PROTECTED] 	
tel;work:+49 2644 602541
tel;home:+49 2644 602540
tel;cell:+49 172 299 66 57
version:2.1
end:vcard

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to