TimeHelper.GetAge method
Version 1.1.28
.NET Framework 4.8
Namespace | Skybrud.Essentials.Time |
---|---|
Assembly | Skybrud.Essentials.dll |
GetAge(DateTime)
Static
Gets the current age, from the specified date of birth.
public static int GetAge(DateTime dateOfBirth)
Parameters
dateOfBirth
DateTime
The date of birth.
Returns
The age based on the specified date of birth.
GetAge(DateTime, DateTime)
Static
Gets the current age, from the specified date of birth. The age is calculated based on dt
.
public static int GetAge(DateTime dateOfBirth, DateTime dt)
Parameters
dateOfBirth
DateTime
The date of birth.
dt
DateTime
The date used for calculating the age.
Returns
The age based on the specified date of birth at the moment of dt
.
GetAge(EssentialsDateTime)
Static
Gets the current age, from the specified date of birth.
public static int GetAge(EssentialsDateTime dateOfBirth)
Parameters
dateOfBirth
EssentialsDateTime
The date of birth.
Returns
The age based on the specified date of birth.
GetAge(EssentialsDateTime, EssentialsDateTime)
Static
Gets the current age, from the specified date of birth. The age is calculated based on dt
.
public static int GetAge(EssentialsDateTime dateOfBirth, EssentialsDateTime dt)
Returns
The age based on the specified date of birth at the moment of dt
.