Skip to main content

Date.new

Date.newyearmonthday

Group: DateTime

Documentation

Constructs a new Date from a year, month, and day.

Returns a Time_Error if the provided time is not valid.

Arguments

  • year: The year to represent.
  • month: The month-of-year to represent, from 1 (January) to 12 (December).
  • day: The day-of-month to represent, from 1 to 31. It must be valid for the year and month.

Examples

Create a new local date at Unix epoch.

      from Standard.Base import Date

example_new = Date.new 1970

Get the local date of 5th August 1986.

      example_new = Date.new 1986 8 5