2014-09-19 9:16 GMT-03:00 Sven Van Caekenberghe <[email protected]>: > Part of that is in > https://pharo.fogbugz.com/f/cases/13229/Year-arithmetic-broken > > Furthermore, I am not so sure all this is a good idea, year/month durations > are not constants and are dealt with differently in many context (say the > financial world).
+1 > January 30 + 1 month ? > January 31 + 1 month ? > Februari 29 2004 + 1 year ? > > And given all sorts of cleverness, will basic math rules still work ? > > A +B = B + A > A + B = C => C - B = A Pharo Date/DateAndTime are incremental[1], then all this week/month/year operations will simply add/subtract the increment from epoch. The only way to do this in a deterministic way is to have a field based Date. Regards! Esteban A. Maringolo [1] http://www.w3.org/TR/2005/NOTE-timezone-20051013/#d2e310
