--- /home/wking/src/gramps/src/plugins/textreport/BirthdayReport.py	2011-09-15 07:09:35.000000000 -0400
+++ CalendarDates/CalendarDates.py	2011-12-08 07:16:13.000000000 -0500
@@ -2,8 +2,9 @@
 #
 # Copyright (C) 2000-2007  Donald N. Allingham
 # Copyright (C) 2008-2009  Brian G. Matherly
-# Copyright (C) 2009           Rob G. Healey <robhealey1@gmail.com>
+# Copyright (C) 2009       Rob G. Healey <robhealey1@gmail.com>
 # Copyright (C) 2010       Jakim Friant
+# Copyright (C) 2011       W. Trevor King <wking@drexel.edu>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -144,26 +145,6 @@
         # get data from database:
         self.collect_data()
         # generate the report:
-        self.doc.start_paragraph('BIR-Title') 
-        self.doc.write_text(str(self.titletext) + ": " + str(self.year))
-        self.doc.end_paragraph()
-        if self.text1.strip() != "":
-            self.doc.start_paragraph('BIR-Text1style')
-            self.doc.write_text(str(self.text1))
-            self.doc.end_paragraph()
-        if self.text2.strip() != "":
-            self.doc.start_paragraph('BIR-Text2style')
-            self.doc.write_text(str(self.text2))
-            self.doc.end_paragraph()
-        if self.text3.strip() != "":
-            self.doc.start_paragraph('BIR-Text3style')
-            self.doc.write_text(str(self.text3))
-            self.doc.end_paragraph()
-        if self.relationships:
-            name = self.center_person.get_primary_name()
-            self.doc.start_paragraph('BIR-Text3style')
-            self.doc.write_text(_("Relationships shown are to %s") % _nd.display_name(name))
-            self.doc.end_paragraph()
         self.progress.set_pass(_('Formatting months...'), 12)
         for month in range(1, 13):
             self.progress.step()
@@ -173,26 +154,17 @@
     def print_page(self, month):
         """ Prints a month as a page """
         year = self.year
-        self.doc.start_paragraph('BIR-Monthstyle')
-        self.doc.write_text(_dd.long_months[month].capitalize())
-        self.doc.end_paragraph()
         current_date = datetime.date(year, month, 1)
         current_ord = current_date.toordinal()
-        started_day = {}
         for i in range(31):
             thisday = current_date.fromordinal(current_ord)
             if thisday.month == month:
                 list = self.calendar.get(month, {}).get(thisday.day, [])
                 for p in list:
                     p = p.replace("\n", " ")
-                    if thisday not in started_day:
-                        self.doc.start_paragraph("BIR-Daystyle")
-                        self.doc.write_text(str(thisday.day))
-                        self.doc.end_paragraph()
-                        started_day[thisday] = 1
-                    self.doc.start_paragraph("BIR-Datastyle")
-                    self.doc.write_text(p)
-                    self.doc.end_paragraph()
+                    self.doc.f.write(
+                        '{}\t{}\n'.format(
+                            thisday.strftime('%B %d'), p))
             current_ord += 1
 
     def collect_data(self):
@@ -241,7 +213,10 @@
                                 if father_handle:
                                     father = self.database.get_person_from_handle(father_handle)
                                     if father is not None:
-                                        father_lastname = father.get_primary_name().surname
+                                        try:
+                                            father_lastname = father.get_primary_name().surname
+                                        except AttributeError:
+                                            pass
                 short_name = self.get_name(person, father_lastname)
 
                 alive = probably_alive(person, self.database, prob_alive_date)
@@ -255,17 +230,10 @@
                                                          person)
                         if relation:
                             comment = " --- %s" % relation
-                    if nyears == 0:
-                        text = _('%(person)s, birth%(relation)s') % {
-                            'person'   : short_name,
-                            'relation' : comment}
-                    else:
-                        text = (ngettext('%(person)s, %(age)d%(relation)s', 
-                                         '%(person)s, %(age)d%(relation)s', nyears)
-                                % {'person'   : short_name,
-                                   'age'      : nyears,
-                                   'relation' : comment})
-
+                    text = _('%(person)s, birth%(relation)s (%(year)d)') % {
+                        'person'   : short_name,
+                        'relation' : comment,
+                        'year'     : year}
                     self.add_day_item(text, month, day)
             if self.anniversaries:
                 family_list = person.get_family_handle_list()
@@ -305,24 +273,18 @@
                                     nyears = self.year - year
 
                                     if event_obj.is_valid():
-                                        if nyears == 0:
-                                            text = _("%(spouse)s and\n %(person)s, wedding") % {
-                                                     'spouse' : spouse_name, 
-                                                     'person' : short_name}
-                                        else:
-                                            text = (ngettext("%(spouse)s and\n %(person)s, %(nyears)d",
-                                                             "%(spouse)s and\n %(person)s, %(nyears)d", nyears)
-                                                    % {'spouse' : spouse_name, 
-                                                       'person' : short_name, 
-                                                       'nyears' : nyears})
+                                        text = _("%(spouse)s and %(person)s, wedding (%(year)d)") % {
+                                            'spouse' : spouse_name, 
+                                            'person' : short_name,
+                                            'year'   : year}
  
-                                            prob_alive_date = Date(self.year, month, day)
-                                            alive1 = probably_alive(person, self.database,
-                                                                    prob_alive_date)
-                                            alive2 = probably_alive(spouse, self.database,
-                                                                    prob_alive_date)
-                                            if (self.alive and alive1 and alive2) or not self.alive:
-                                                self.add_day_item(text, month, day)
+                                        prob_alive_date = Date(self.year, month, day)
+                                        alive1 = probably_alive(person, self.database,
+                                                                prob_alive_date)
+                                        alive2 = probably_alive(spouse, self.database,
+                                                                prob_alive_date)
+                                        if (self.alive and alive1 and alive2) or not self.alive:
+                                            self.add_day_item(text, month, day)
 
 #------------------------------------------------------------------------
 #
@@ -476,19 +438,5 @@
         
     def make_default_style(self, default_style):
         """ Add the styles used in this report """
-        self.make_my_style(default_style, "BIR-Title", 
-                           _('Title text style'), 14, 
-                           bold=1, justified="center")
-        self.make_my_style(default_style, "BIR-Datastyle", 
-                           _('Data text display'), 12, indent=1.0)
-        self.make_my_style(default_style, "BIR-Daystyle", 
-                           _('Day text style'), 12, indent=.5, 
-                           italic=1, bold=1)
-        self.make_my_style(default_style, "BIR-Monthstyle", 
-                           _('Month text style'), 14, bold=1)
-        self.make_my_style(default_style, "BIR-Text1style", 
-                           _('Text at bottom, line 1'), 12, justified="center")
-        self.make_my_style(default_style, "BIR-Text2style", 
-                           _('Text at bottom, line 2'), 12, justified="center")
-        self.make_my_style(default_style, "BIR-Text3style", 
-                           _('Text at bottom, line 3'), 12, justified="center")
+        self.make_my_style(default_style, "Line-style", 
+                           _('Data line display'))
