Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Date.fromMap

Date.fromMap($dateMap) -> Date

Description

Create a new Date object, given a map of fields.

The $dateMap can have these fields. If a field is missing, it defaults to 0.

$date = Date.fromMap({
    year: 2033,
    month: 3,
    day: 30,
})

$date.format()
//= 2033-03-30T00:00:00+0000

See Also