Home Contents | # date:set | Date/Time | Core4 Lua Commands

## SYNOPSIS

date::set([year[, month[, day]]])

## DESCRIPTION

Changes the stored date value. Values that are not specified or passed as nil are not changed.

## ERRORS

Raises an error if date is not a date instance.

## EXAMPLE

> >
d = clock.newDate(2001, 9, 9) print(d)
2001-09-09
> >
d:set(nil, nil, 20) print(d)
2001-09-20

## SEE ALSO

clock.currentDate, clock.newDate, date(), date:addDays, date:addMonths, date:addYears, date:day, date:dayOfWeek, date:dayOfYear, date:days90, date:daysInMonth, date:daysInYear, date:daysTo, date:format, date:isNull, date:isValid, date:month, date:setDays90, date:weekNumber, date:year, tostring(date)