Dec. 3, 2014
8:33 p.m.
Le 02/12/2014 17:34, Sean P. DeNigris a écrit :
One solution (just ignore the source ha ha) - http://msdn.microsoft.com/en-us/library/system.datetime.addyears%28v=vs.110%...
Something like ? Date>>addYears: integer ^ Date year: self year + integer month: self monthIndex day: ((self dayOfMonth = 29 and: [(Year isLeapYear: self year + integer) not and: [Year isLeapYear: self year]]) ifTrue: [ 28 ] ifFalse: [ self dayOfMonth]) -- Dr. Geo - http://drgeo.eu iStoa - http://istoa.drgeo.eu