isThisYear method
Returns true
if the year is the same as a specific dateTime
or the current time.
特定のdateTime
もしくは現在時間と同じ年の場合はtrue
を返します。
Implementation
bool isThisYear([DateTime? dateTime]) {
dateTime ??= DateTime.now();
return year == dateTime.year;
}