On Jan 3, 2008, at 4:48 PM, Johan Vromans wrote:

Eric Wilhelm <[EMAIL PROTECTED]> writes:

 The caveat may apply if today is any day >= 28 -- if we run
out of days in the destination month, we stop at the end.

I'd say that January 30 + 1 month should be March 1, not February 29.

-- Johan

The Java world is considering the same question. The current release has java.util.Calendar which does as you suggest, and it's a horrible, widely-despised solution. The proposed change for Java 7 is based on the joda-time.sf.net library which takes an interesting approach: distinguish between adding a Duration and a Period. What you describe would be adding Period.month(1). Joda considers the difference between two DateTime instances to be a Duration.

Chris

Reply via email to