Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

Create

static func Create(year: int, month: int, day: int) -> Result<Date, InvalidDateError>

Declaring type: Date
Module: System.Time
Assembly: System.Runtime.dll
Source file: Date.rvn

Validates the supplied date components and returns the value or its typed validation error.

Parameters

Name Type Description
year Int32 The Gregorian year, from 1 through 9999.
month Int32 The month, from 1 through 12.
day Int32 The day in the specified month, starting at 1.

Return value

Result<Date, InvalidDateError>