How do I add a year to a specific date taking leap years into consideration?
myDate.AddYears(1) seems to be working fine, e.g. if the base date is 30th September 2019 the result will be 30th September 2020 and if the base date is 29th February 2020 will return 28th February 2021.
But if the base date is 28th February 2019 the result will be 28th February 2020 - what I need it to be is 29th February 2020.
Thanks @AshwinS2 that helped me a bit further - I can now make a check on leap year and add 1 day if the date is 28th February. Not sure that this is the best way though.