age

package module
v0.0.0-...-33b3d60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 3 Imported by: 0

README

age

Tiny pkg for calculating age from birthDate and printing the age in a human-readable format.

Documentation

Overview

Tiny pkg for calculating age from birthDate and printing the age in a human-readable format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Age

type Age struct {
	Years  int
	Months int
	Days   int
}

func AgeAt

func AgeAt(birthDate time.Time, endDate time.Time) Age

Calculates age from birthDate to now time.

func CurrentAge

func CurrentAge(birthDate time.Time) Age

Calculates the current age at this instant.

func (Age) String

func (a Age) String() string

Returns a human-readable age representation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL