DateTimeExtensions.GetAge method
Version 1.1.28
.NET Framework 4.8
Namespace | Skybrud.Essentials.Time.Extensions |
---|---|
Assembly | Skybrud.Essentials.dll |
GetAge(DateTime)
Extension method
Gets the current age, from the specified date of birth.
public static int GetAge(this DateTime dateOfBirth)
Parameters
dateOfBirth
DateTime
The date of birth.
GetAge(DateTime, DateTime)
Extension method
Gets the current age, from the specified date of birth. The age is calculated based on dt
.
public static int GetAge(this DateTime dateOfBirth, DateTime dt)