yearEnd property
DateTime
get
yearEnd
Gets the end date of the year.
Returns: DateTime: The last day of the year.
Throws: ArgumentError: If the year is greater than 9999.
Implementation
DateTime get yearEnd {
if (year > 9999) {
throw ArgumentError('[year] must be <= 9999');
}
return DateTime(year, 12, 31);
}