Actually that simplification doesn’t work - someone born on 1/Mar/2000 should 
be 11 on 1/Mar/2011 and this answers 10 (the previous version did work).

This does make me think its tricky enough to put this in the core - I may 
submit it along with the unit tests I borrowed from Stack Overflow (the shame)…

Its a good problem though. Thanks for discussing it with me.

Tim

> On 21 Jul 2017, at 10:09, K K Subbu <kksubbu...@gmail.com> wrote:
> 
> ^aDate year - self year -
> (aDate dayOfYear < self dayOfYear) ifTrue: [ 1 ] ifFalse: [ 0 ])

Reply via email to