Logo GenPRES

Dto Module

Holds the Dto of a birth date and converts a birth date to and from the Dto. Returns the validation errors for an invalid or future date.

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<BirthDate, ValidationErrors>

Validates a Dto as a birth date: a valid date from 1900 on, not after today and less than 120 years of 365 days before today.

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

toDto ymd

Full Usage: toDto ymd

Parameters:
Returns: Dto
ymd : BirthDate
Returns: Dto

Type something to start searching.