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