person

package
v0.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateAge

func CalculateAge(birthdate, today time.Time) int

CalculateAge calculates the age based on a given birthdate and the current date in the format dd/mm/yy It adjusts for cases where the current date is before the birthday in the current year.

func CalculateAgeWithYOB

func CalculateAgeWithYOB(yob int) int

CalculateAgeWithYOB calculates the age based on the given year of birth (YOB). It subtracts the YOB from the current year to determine the age.

Parameters:

yob: The year of birth as an integer.

Returns:

The calculated age as an integer.

func ConstructName

func ConstructName(firstName, familyName, defaultValue string) string

func IsValidYOb

func IsValidYOb(yob string) bool

IsValidYob checks if the provided yob can be considered valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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