/// <summary> /// Gets the formatted age string for user interface display. /// </summary> /// <param name="birth">The date of birth</param> /// <param name="visit">The date of visit</param> /// <returns>Returns the formatted age string for user interface display.</returns> public string GetAgeString(DateTime birth, DateTime visit) { Age age = new Age(birth, visit); return(age.ToReadableString()); }
/// <summary> /// Gets the calculated age in total days. /// </summary> /// <param name="birth">The date of birth</param> /// <param name="visit">The date of visit</param> /// <returns>Returns the calculated age in total days.</returns> public int GetAgeInDays(DateTime birth, DateTime visit) { Age age = new Age(birth, visit); return(age.TotalDays); }