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

Date.set

$date.set($field, $value) -> Date

Description

Create a new date based on the current date, with the given field set to a new value.

The fields that can be set are:

$date1 = Date.create('2033-03-31 13:21:45')

$date2 = $date1.set('year', 2333)
//=《 Date 2333-03-31 13:21:45 +0000 》

See Also