Add implementation of getYear method