Convert duration to years?
    Nestor via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sun Jan 15 06:20:04 PST 2017
    
    
  
On Sunday, 15 January 2017 at 14:04:39 UTC, Nestor wrote:
> ...
> For example, take a baby born in february 29 of year 2000 (leap 
> year). In february 28 of 2001 that baby was one day short to 
> one year.
>
> Family can make a concession and celebrate birthdays in 
> february 28 of non-leap years, but march 1 is the actual day 
> when the year of life completes. Which one to choose?
>
On second thought, if a baby was born in march 1 of 1999 
(non-leap year), in march 1 of 2000 (leap year) the age would 
have been one year plus one day (because of february 29). So 
perhaps the best thing is to always perform a "relaxed" 
calculation.
    
    
More information about the Digitalmars-d-learn
mailing list