So I'm working on this little app that has functions for dates (show difference in days, months, years etc) Now doing things like "The selected date was 14151 days, 465 months and 39 years ago" is easy, but how can I get it to say it in a readable format ("15 days, 7 months and 39 years ago")?
Right now to do that I've got it set to get the difference in years like
int years = selectedDate.Year - currentDate.Year
same for months and days. However this barely works and goes wrong especially when going a month forward (when it might say 15 days and 1 month because date1.Day - date2.Day = 15, while it might actually be, say 8 days. I think this is because of the way dates work with months n stuff but I'm not sure.
Anyway, I hope i made any sense because I can't really keep track myself even. Any ideas are much appreciated. :D