Logo GenPRES

WeightAtDate Module

Creates a weight with an optional measurement date and writes the weight with the date.

Nested modules

Modules Description

Dto

Holds the Dto of a weight at a date and converts a weight at a date to and from the Dto. Returns a validation error for a weight outside the bounds or a date after today.

Optics

Holds a getter and setter pair for the date and for the weight of a weight at a date.

SetGet

Gets the date and the weight of a weight at a date.

Functions and values

Function or value Description

create dt wv

Full Usage: create dt wv

Parameters:
Returns: WeightAtDate

Creates a weight at a date; a date of None gives a weight without a date.

dt : DateTime option
wv : WeightValue
Returns: WeightAtDate

fromAgeType gend

Full Usage: fromAgeType gend

Parameters:
Returns: AgeType -> WeightAtDate option

Returns the normal weight of an age type for a gender as an undated weight.

gend : Gender
Returns: AgeType -> WeightAtDate option

toString fixPrec w

Full Usage: toString fixPrec w

Parameters:
Returns: string

Writes the weight, followed by the date in brackets when the weight has a date.

fixPrec : int
w : WeightAtDate
Returns: string

undated

Full Usage: undated

Returns: WeightValue -> WeightAtDate

Creates a weight without a date.

Returns: WeightValue -> WeightAtDate

Type something to start searching.