setDate()

The method setDate sets a date.

Synopsis

int time.setDate(int year, int month, int day);

Description

Sets a date. Note that year 0 does not exist. setDate() does not change the time.

Return Value

In case of illegal dates, the function returns -1 and otherwise 0.

Example

main()
{
  time t;
  DebugN("Set the date:", t.setDate(2021,3,5));
}

Assignment

Time function

Availability

UI,CTRL