Example #1
0
 def collation_name(self):
     prefix = self.title or self.honorific
     cn = self._wrapped.collation_name()
     n = ' '.join([prefix, cn])
     if prefix:
         n = sortstr(n)
         start = len(prefix) + 1
         n.sortslice = slice(start, start + len(cn))
     return n
Example #2
0
 def formal_index_name(self):
     prefix = self.title or self.honorific
     fin = self._wrapped.formal_index_name()
     n = ' '.join([prefix, fin])
     if prefix:
         n = sortstr(n)
         start = len(prefix) + 1
         n.sortslice = slice(start, start + len(fin))
     return n
Example #3
0
 def formal_name(self):
     prefix = self.honorific or self.title
     fn = self._wrapped.full_name()
     n = ', '.join(filter(bool, [' '.join([prefix, fn]), self.letters]))
     if prefix or self.letters:
         n = sortstr(n)
         start = len(prefix) + 1 if prefix else 0
         n.sortslice = slice(start, start + len(fn))
     return n
Example #4
0
 def social_name(self):
     prefix = self.title
     tn = self._wrapped.title_name()
     n = ' '.join([prefix, tn])
     if prefix:
         n = sortstr(n)
         start = len(prefix) + 1
         n.sortslice = slice(start, start + len(tn))
     return n
Example #5
0
 def complete_name(self):
     prefix = self.honorific or self.title
     cn = self._wrapped.complete_name()
     n = ', '.join(filter(bool, [' '.join(filter(bool, [prefix, cn])),
                                 self.letters]))
     if prefix or self.letters:
         n = sortstr(n)
         start = len(prefix) + 1 if prefix else 0
         n.sortslice = slice(start, start + len(cn))
     return n