year method

int year()

Implementation

int year() => (_year != null) ? DateTime.now().year : 0;