Contact Us 1-800-596-4880

Dates Types (dw::core::Dates)

Type Definition Description

DateFactory

type DateFactory = { day: Number, month: Number, year: Number }

Type containing selectable day, month, and year keys and corresponding Number values, such as {day: 21, month: 1, year: 2021}. The fields accept a Number value. Numbers preceded by 0, such as 01, are not valid.

DateTimeFactory

type DateTimeFactory = DateFactory & LocalTimeFactory & Zoned

Type that combines DateFactory, LocalTimeFactory, and Zoned types. For example, {day: 21, month: 1, year: 2021, hour: 8, minutes: 31, seconds: 55, timeZone : |-03:00|} as DateTimeFactory is a valid DateTimeFactory value.

LocalDateTimeFactory

type LocalDateTimeFactory = DateFactory & LocalTimeFactory

Type that combines DateFactory and LocalTimeFactory types. For example, {day: 21, month: 1, year: 2021, hour: 8, minutes: 31, seconds: 55, timeZone : |-03:00|} as LocalDateTimeFactory is a valid LocalDateTimeFactory value. The timeZone field is optional.

LocalTimeFactory

type LocalTimeFactory = { hour: Number, minutes: Number, seconds: Number }

Type containing selectable hour, minutes, and seconds keys and corresponding Number values, such as {hour: 8, minutes: 31, seconds: 55}. The fields accept any Number value.

TimeFactory

type TimeFactory = LocalTimeFactory & Zoned

Type that combines LocalTimeFactory and Zoned types. For example, {hour: 8, minutes: 31, seconds: 55, timeZone : |-03:00|} as TimeFactory is a valid TimeFactory value.

Zoned

type Zoned = { timeZone: TimeZone }

Type containing a selectable timeZone key and TimeZone value, such as { timezone : |-03:00|}.