Ready to test Windows Project
This commit is contained in:
@ -48,7 +48,7 @@ internal abstract class PersonBirthday
|
||||
if (birthday?.Value is null)
|
||||
throw new NullReferenceException(nameof(birthday.Value));
|
||||
(years, result) = Age.GetAge(dateTimeTicks, birthday.Value);
|
||||
return (years, result);
|
||||
return new(years, result);
|
||||
}
|
||||
|
||||
internal static (int, TimeSpan) GetAge(DateTime dateTime, Models.PersonBirthday birthday)
|
||||
@ -58,7 +58,7 @@ internal abstract class PersonBirthday
|
||||
if (birthday?.Value is null)
|
||||
throw new NullReferenceException(nameof(birthday.Value));
|
||||
(years, result) = Age.GetAge(dateTime, birthday.Value);
|
||||
return (years, result);
|
||||
return new(years, result);
|
||||
}
|
||||
|
||||
internal static (int, double) GetAge(DateTime dateTime, DateTime dayBeforeLeapDate, Models.PersonBirthday birthday)
|
||||
@ -69,7 +69,7 @@ internal abstract class PersonBirthday
|
||||
result = timeSpan.TotalDays / 365;
|
||||
else
|
||||
result = timeSpan.TotalDays / 366;
|
||||
return (years, result);
|
||||
return new(years, result);
|
||||
}
|
||||
|
||||
internal static double? GetAge(Models.PersonBirthday birthday)
|
||||
|
Reference in New Issue
Block a user