Class DateOfBirthExtensions
- Namespace
- XENBIT.ResQueServe.Core.Extensions
- Assembly
- RQS.Core.dll
Ages from dates of birth, in completed years: the same age for the patient of a simulated mission, its PZC and the patient of the operation.
public static class DateOfBirthExtensions
- Inheritance
-
DateOfBirthExtensions
- Inherited Members
Methods
CreateDateOfBirth(int, DateTimeOffset, int)
A date of birth for someone who is age years old at now: the last
birthday was daysSinceBirthday days ago (0–364, clamped to the year since then).
public static DateTimeOffset CreateDateOfBirth(int age, DateTimeOffset now, int daysSinceBirthday)
Parameters
ageintnowDateTimeOffsetdaysSinceBirthdayint
Returns
FromCalendarDate(DateTime, TimeSpan)
A date of birth for the calendar date of date (its time of day is dropped), at noon in
offset. Noon, not midnight: the offset is the session's current one, and on the birth date
the session's time zone may have had another offset (DST). Displayed in any time zone within ±11 hours of it,
the date stays the same.
public static DateTimeOffset FromCalendarDate(DateTime date, TimeSpan offset)
Parameters
Returns
GetAgeInYears(DateTimeOffset, DateTimeOffset)
The completed years at asOf (the birthday of that year counts once reached).
public static int GetAgeInYears(this DateTimeOffset dateOfBirth, DateTimeOffset asOf)
Parameters
dateOfBirthDateTimeOffsetasOfDateTimeOffset