Logo GenPRES

Dto Module

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.

Types

Type Description

Dto

Functions and values

Function or value Description

dto ()

Full Usage: dto ()

Parameters:
    () : unit

Returns: Dto
() : unit
Returns: Dto

fromDto today dto

Full Usage: fromDto today dto

Parameters:
Returns: Result<WeightAtDate, ValidationErrors>

Validates a Dto as a weight: a weight within the bounds, and a date on or before today when the Dto has a date. A Dto without a date gives an undated weight.

today : DateTime
dto : Dto
Returns: Result<WeightAtDate, ValidationErrors>

toDto w

Full Usage: toDto w

Parameters:
Returns: Dto
w : WeightAtDate
Returns: Dto

Type something to start searching.