I remember this was discussed before in the mailing list, not in the context of age calculation, but regarding the offset/duration vs calendar based dates handling. Pharo's core date classes are "incremental", which isn't suited for calendar sensitive calculations. Java core class for those calculations is the java.util.Calendar class which is "field" based. See http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4... Esteban A. Maringolo 2017-07-21 12:16 GMT-03:00 Tim Mackinnon <tim@testit.works>:
I hadnât heard of that library - looks like one to keep in the back of my mind for more serious date related work.
I do think that age or ageOn: should be in the standard core particularly when we have so many date and duration related classes - but Iâm not sure what the feeling is about adding methods. Certainly the group I saw learning smalltalk were very surprised it wasnât there particularly when they saw the rich models we do have.
I am also wondering if the issue with Timespan is concerning - I was surprised that putting a start and end date left me something that didnât answer my end date presumably down to rounding when itâs converted down to a duration (making me wonder if its better to keep a start and end date and calculate the duration on the fly).
On 21 Jul 2017, at 13:58, Esteban A. Maringolo <emaringolo@gmail.com> wrote: You might consider a full-fledged framework for it like Chalten: https://github.com/ba-st/chalten