Index: calendar/gui/e-day-view.c
===================================================================
--- calendar/gui/e-day-view.c	(revision 33664)
+++ calendar/gui/e-day-view.c	(working copy)
@@ -2508,6 +2508,7 @@
 {
 	EDayViewEvent *event;
 	const gchar *summary;
+	gboolean free_text = FALSE;
 
 	event = &g_array_index (day_view->long_events, EDayViewEvent,
 				event_num);
@@ -2516,11 +2517,15 @@
 	if (!event->canvas_item)
 		return;
 
-	summary = icalcomponent_get_summary (event->comp_data->icalcomp);
+	summary = e_calendar_view_get_icalcomponent_summary (event->comp_data->icalcomp, &free_text);
+
 	gnome_canvas_item_set (event->canvas_item,
 			       "text", summary ? summary : "",
 			       NULL);
-	
+
+	if (free_text)
+		g_free ((gchar*)summary);
+
 /*	if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) 
 				&& e_cal_util_component_has_attendee (event->comp_data->icalcomp)) 
 		set_text_as_bold (event); */
Index: calendar/gui/e-week-view.c
===================================================================
--- calendar/gui/e-week-view.c	(revision 33664)
+++ calendar/gui/e-week-view.c	(working copy)
@@ -2722,15 +2722,16 @@
 
 	/* Create the text item if necessary. */
 	if (!span->text_item) {
-		ECalComponentText cal_text;
+		const gchar *summary;
 		GtkWidget *widget;
 		GdkColor color;
+		gboolean free_text = FALSE;
 
 		widget = (GtkWidget *)week_view;
 
 		color = e_week_view_get_text_color (week_view, event, widget);
-		
-		e_cal_component_get_summary (comp, &cal_text);
+		summary = e_calendar_view_get_icalcomponent_summary (e_cal_component_get_icalcomponent (comp), &free_text);
+
 		span->text_item =
 			gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root),
 					       e_text_get_type (),
@@ -2738,12 +2739,15 @@
 					       "clip", TRUE,
 					       "max_lines", 1,
 					       "editable", TRUE,
-					       "text", cal_text.value ? cal_text.value : "",
+					       "text", summary ? summary : "",
 					       "use_ellipsis", TRUE,
 					       "fill_color_gdk", &color,
 					       "im_context", E_CANVAS (week_view->main_canvas)->im_context,
 					       NULL);
 		
+		if (free_text)
+			g_free ((gchar*)summary);
+		
 /*		Uncomment once the pango fix is in 
 		if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) 
 				&& e_cal_util_component_has_attendee (event->comp_data->icalcomp)) {
@@ -2993,6 +2997,7 @@
 	EWeekViewEvent *event;
 	EWeekViewEventSpan *span;
 	const gchar *summary;
+	gboolean free_text = FALSE;
 
 	event_num = week_view->editing_event_num;
 	span_num = week_view->editing_span_num;
@@ -3004,9 +3009,12 @@
 
 	/* Reset the text to what was in the component */
 
-	summary = icalcomponent_get_summary (event->comp_data->icalcomp);
+	summary = e_calendar_view_get_icalcomponent_summary (event->comp_data->icalcomp, &free_text);
 	g_object_set (G_OBJECT (span->text_item), "text", summary ? summary : "", NULL);
 
+	if (free_text)
+		g_free ((gchar*)summary);
+	
 	/* Stop editing */
 	e_week_view_stop_editing_event (week_view);
 }
Index: calendar/gui/e-calendar-view.c
===================================================================
--- calendar/gui/e-calendar-view.c	(revision 33664)
+++ calendar/gui/e-calendar-view.c	(working copy)
@@ -2106,6 +2106,7 @@
 	ECalComponent *newcomp = e_cal_component_new ();
 	icaltimezone *zone, *default_zone;	
 	ECal *client = NULL;
+	gboolean free_text = FALSE;
 
 	/* Delete any stray tooltip if left */
 	if (widget)
@@ -2122,7 +2123,7 @@
 
 	box = gtk_vbox_new (FALSE, 0);
 
-	str = icalcomponent_get_summary (pevent->comp_data->icalcomp);
+	str = e_calendar_view_get_icalcomponent_summary (pevent->comp_data->icalcomp, &free_text);
 
 	if (!(str && *str)) {
 		g_object_unref (newcomp);
@@ -2136,7 +2137,12 @@
 	label = gtk_label_new (NULL);
 	gtk_label_set_line_wrap ((GtkLabel *)label, TRUE);
 	gtk_label_set_markup ((GtkLabel *)label, tmp);
-	
+
+	if (free_text) {
+		g_free ((char*)str);
+		str = NULL;
+	}
+
 	hbox = gtk_hbox_new (FALSE, 0);
 	gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 0);
 	ebox = gtk_event_box_new ();
@@ -2239,7 +2245,59 @@
 
 	return FALSE;
 }
-	
+
+static gboolean
+icalcomp_contains_category (icalcomponent *icalcomp, const gchar *category)
+{
+	icalproperty *property;
+
+	g_return_val_if_fail (icalcomp != NULL && category != NULL, FALSE);
+
+	for (property = icalcomponent_get_first_property (icalcomp, ICAL_CATEGORIES_PROPERTY);
+	     property != NULL;
+	     property = icalcomponent_get_next_property (icalcomp, ICAL_CATEGORIES_PROPERTY)) {
+		const char *value = icalproperty_get_value_as_string (property);
+
+		if (value && strcmp (category, value) == 0)
+			return TRUE;
+	}
+
+	return FALSE;
+}
+
+/* e_calendar_view_get_icalcomponent_summary returns summary of calcomp,
+ * and for type of birthday or anniversary it append number of years since
+ * beginning. In this case, the free_text is set to TRUE and caller need
+ * to g_free returned string, otherwise free_text is set to FALSE and
+ * returned value is owned by calcomp.
+ */
+
+const gchar *
+e_calendar_view_get_icalcomponent_summary (icalcomponent *icalcomp, gboolean *free_text)
+{
+	const gchar *summary;
+
+	g_return_val_if_fail (icalcomp != NULL && free_text != NULL, NULL);
+
+	*free_text = FALSE;
+	summary = icalcomponent_get_summary (icalcomp);
+
+	if (icalcomp_contains_category (icalcomp, _("Birthday")) ||
+	    icalcomp_contains_category (icalcomp, _("Anniversary"))) {
+		struct icaltimetype dtstart, dtnow;
+
+		dtstart = icalcomponent_get_dtstamp (icalcomp);
+		dtnow = icalcomponent_get_dtstart (icalcomp);
+
+		if (dtnow.year - dtstart.year > 0) {
+			summary = g_strdup_printf ("%s (%d)", summary ? summary : "", dtnow.year - dtstart.year);
+			*free_text = summary != NULL;
+		}
+	}
+
+	return summary;
+}
+
 #ifdef ENABLE_CAIRO
 void
 draw_curved_rectangle (cairo_t *cr, double x0, double y0,
Index: calendar/gui/e-calendar-view.h
===================================================================
--- calendar/gui/e-calendar-view.h	(revision 33664)
+++ calendar/gui/e-calendar-view.h	(working copy)
@@ -169,6 +169,8 @@
 
 void           e_calendar_view_move_tip (GtkWidget *widget, int x, int y);
 
+const gchar *e_calendar_view_get_icalcomponent_summary (icalcomponent *icalcomp, gboolean *free_text);
+
 #ifdef ENABLE_CAIRO
 void           draw_curved_rectangle (cairo_t *cr,
                                       double x0,
Index: calendar/ChangeLog
===================================================================
--- calendar/ChangeLog	(revision 33664)
+++ calendar/ChangeLog	(working copy)
@@ -1,3 +1,16 @@
+2007-06-08  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #300584
+
+	* gui/e-calendar-view.h: Added public helper
+	function e_calendar_view_get_icalcomponent_summary
+	* gui/e-calendar-view.c: (e_calendar_view_get_icalcomponent_summary),
+	(icalcomp_contains_category), (e_calendar_view_get_tooltips):
+	Implementing helper functions and added year number also into tooltip.
+	* gui/e-day-view.c: (e_day_view_update_long_event_label):
+	* gui/e-week-view.c: (e_week_view_reshape_event_span),
+	(cancel_editing): Using e_calendar_view_get_icalcomponent_summary.
+
 2007-06-06  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
 	* Makefile.am:
