yearEnd property
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
@useResult
DateTime get yearEnd {
if (year > DateConstants.maxYear) {
throw ArgumentError(_yearExceedsMaxMessage);
}
return DateTime(year, DateTime.december, DateConstants.decemberLastDay);
}