PayneAgeCalculator 1.0.0

dotnet add package PayneAgeCalculator --version 1.0.0                
NuGet\Install-Package PayneAgeCalculator -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PayneAgeCalculator" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PayneAgeCalculator --version 1.0.0                
#r "nuget: PayneAgeCalculator, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PayneAgeCalculator as a Cake Addin
#addin nuget:?package=PayneAgeCalculator&version=1.0.0

// Install PayneAgeCalculator as a Cake Tool
#tool nuget:?package=PayneAgeCalculator&version=1.0.0                

Payne Age Calculator

Calculates the age of person

Provide a date in the past using today as the date to calulate too.

DateTime birthDate = new DateTime(1956, 9, 24);
Console.WriteLine(birthDate.Age().YearsMonthsDays);

Provide a date in the past and a future date

var result = birthDate.Age(DateTime.Now);
Console.WriteLine(result.YearsMonthsDays);

Include hours and minutes

Console.WriteLine($"{result.YearsMonthsDays} {result.Hours}:{result.Minutes}");

Or

Console.WriteLine(result.YearsMonthsDaysTime);

Include seconds

Console.WriteLine($"{result.YearsMonthsDays} {result.Hours}:{result.Minutes}:{result.Seconds}");

See also

NuGet package myage which is the same as this library but a dotnet tool.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 335 9/13/2022

Intial release