DateOnly.withYearMonthDay constructor

DateOnly.withYearMonthDay({
  1. required int year,
  2. required int month,
  3. required int day,
})

Creates a new date-only object from the provided year, month, and day.

Year must be at least 1 AD, month must be a value between 1-12 (inclusive), day must be a value between 1-31 (inclusive).

Parameters:

  • year — The year.
  • month — The month.
  • day — The day.