LocalDate constructor

LocalDate([
  1. int year = 0,
  2. int month = 1,
  3. int day = 1
])

Constructs a LocalDate from individual parts.

The year uses ISO 8601, or astronomical year numbering and may be zero or negative. When negative, year equates to year - 1 BCE. Throws an exception if month or day is invalid.

Throws an exception if the date would be invalid.

Implementation

LocalDate([this.year = 0, this.month = 1, this.day = 1]) {
  _validate();
}