This function returns the year of the given datetime.
date_get_year(date);
Real
myyear = date_get_year(date_current_datetime());
This would set "myyear" to the current year.