2006-05-01 21:11:26 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2004-09-17 03:30:04 +00:00
|
|
|
#
|
|
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
|
|
#
|
2006-02-03 22:03:53 +00:00
|
|
|
# Copyright (C) 2004-2006 Donald N. Allingham
|
2004-09-17 03:30:04 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
"""
|
|
|
|
U.S English date display class. Should serve as the base class for all
|
|
|
|
localized tasks.
|
|
|
|
"""
|
|
|
|
|
2006-03-05 04:45:44 +00:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# set up logging
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
import logging
|
|
|
|
log = logging.getLogger(".DateDisplay")
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# GRAMPS modules
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2007-10-08 16:41:39 +00:00
|
|
|
from gen.lib import Date
|
2005-12-30 03:57:31 +00:00
|
|
|
import GrampsLocale
|
2004-09-19 23:05:25 +00:00
|
|
|
|
2006-03-05 04:45:44 +00:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# DateDisplay
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2005-01-12 21:23:31 +00:00
|
|
|
class DateDisplay:
|
2004-09-17 23:52:09 +00:00
|
|
|
|
2005-12-30 03:57:31 +00:00
|
|
|
_months = GrampsLocale.long_months
|
2007-06-27 04:50:33 +00:00
|
|
|
MONS = GrampsLocale.short_months
|
2004-09-17 03:30:04 +00:00
|
|
|
|
2005-12-30 03:57:31 +00:00
|
|
|
_tformat = GrampsLocale.tformat
|
2004-09-24 22:05:46 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
hebrew = (
|
|
|
|
"", "Tishri", "Heshvan", "Kislev", "Tevet", "Shevat",
|
|
|
|
"AdarI", "AdarII", "Nisan", "Iyyar", "Sivan", "Tammuz",
|
2004-09-17 23:52:09 +00:00
|
|
|
"Av", "Elul"
|
2004-09-17 03:30:04 +00:00
|
|
|
)
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
french = (
|
|
|
|
u'',
|
|
|
|
u"Vendémiaire",
|
|
|
|
u'Brumaire',
|
|
|
|
u'Frimaire',
|
|
|
|
u"Nivôse",
|
|
|
|
u"Pluviôse",
|
|
|
|
u"Ventôse",
|
|
|
|
u'Germinal',
|
|
|
|
u"Floréal",
|
|
|
|
u'Prairial',
|
|
|
|
u'Messidor',
|
|
|
|
u'Thermidor',
|
|
|
|
u'Fructidor',
|
|
|
|
u'Extra',
|
2004-09-17 03:30:04 +00:00
|
|
|
)
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
persian = (
|
|
|
|
"", "Farvardin", "Ordibehesht", "Khordad", "Tir",
|
|
|
|
"Mordad", "Shahrivar", "Mehr", "Aban", "Azar",
|
2004-09-17 23:52:09 +00:00
|
|
|
"Dey", "Bahman", "Esfand"
|
2004-09-17 03:30:04 +00:00
|
|
|
)
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
islamic = (
|
|
|
|
"", "Muharram", "Safar", "Rabi`al-Awwal", "Rabi`ath-Thani",
|
|
|
|
"Jumada l-Ula", "Jumada t-Tania", "Rajab", "Sha`ban",
|
2004-09-17 23:52:09 +00:00
|
|
|
"Ramadan", "Shawwal", "Dhu l-Qa`da", "Dhu l-Hijja"
|
2004-09-17 03:30:04 +00:00
|
|
|
)
|
|
|
|
|
2009-01-19 20:09:19 +00:00
|
|
|
swedish = (
|
|
|
|
"", "Januari", "Februari", "Mars",
|
|
|
|
"April", "Maj", "Juni",
|
|
|
|
"Juli", "Augusti", "September",
|
|
|
|
"Oktober", "November", "December"
|
|
|
|
)
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
formats = ("YYYY-MM-DD (ISO)", )
|
2004-09-17 23:52:09 +00:00
|
|
|
|
2005-01-12 21:23:31 +00:00
|
|
|
calendar = (
|
2009-01-17 14:33:10 +00:00
|
|
|
"", "Julian", "Hebrew", "French Republican",
|
2009-01-20 13:13:44 +00:00
|
|
|
"Persian", "Islamic", "Swedish"
|
2005-01-12 21:23:31 +00:00
|
|
|
)
|
2009-01-17 14:33:10 +00:00
|
|
|
|
|
|
|
newyear = ("", "Mar1", "Mar25", "Sep1")
|
2005-01-12 21:23:31 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
_mod_str = ("", "before ", "after ", "about ", "", "", "")
|
2004-09-24 22:05:46 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
_qual_str = ("", "estimated ", "calculated ")
|
2005-05-24 13:08:06 +00:00
|
|
|
|
|
|
|
_bce_str = "%s B.C.E."
|
2005-01-12 21:23:31 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def __init__(self, format=None):
|
2005-01-19 00:13:57 +00:00
|
|
|
self.display_cal = [
|
2007-06-27 04:50:33 +00:00
|
|
|
self._display_gregorian,
|
|
|
|
self._display_julian,
|
|
|
|
self._display_hebrew,
|
|
|
|
self._display_french,
|
|
|
|
self._display_persian,
|
|
|
|
self._display_islamic,
|
2009-01-19 20:09:19 +00:00
|
|
|
self._display_swedish]
|
2005-01-19 00:13:57 +00:00
|
|
|
|
|
|
|
self.verify_format(format)
|
2008-06-16 15:01:46 +00:00
|
|
|
if format is None:
|
2005-01-19 00:13:57 +00:00
|
|
|
self.format = 0
|
|
|
|
else:
|
|
|
|
self.format = format
|
2004-09-17 23:52:09 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def set_format(self, format):
|
2005-01-19 00:13:57 +00:00
|
|
|
self.format = format
|
2004-09-26 03:08:53 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def verify_format(self, format):
|
2004-09-23 21:32:07 +00:00
|
|
|
pass
|
2004-09-17 03:30:04 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def quote_display(self, date):
|
2004-09-17 03:30:04 +00:00
|
|
|
"""
|
|
|
|
Similar to the display task, except that if the value is a text only
|
|
|
|
value, it is enclosed in quotes.
|
|
|
|
"""
|
|
|
|
if date.get_modifier() == Date.MOD_TEXTONLY:
|
|
|
|
return '"%s"' % self.display(date)
|
|
|
|
else:
|
|
|
|
return self.display(date)
|
|
|
|
|
2009-01-17 14:33:10 +00:00
|
|
|
def format_extras(self, cal, newyear):
|
|
|
|
"""
|
|
|
|
Formats the extra items (calendar, newyear) for a date.
|
|
|
|
"""
|
|
|
|
scal = self.calendar[cal]
|
|
|
|
snewyear = self.newyear[newyear]
|
|
|
|
retval = ""
|
|
|
|
for item in [scal, snewyear]:
|
|
|
|
if item:
|
|
|
|
if retval:
|
|
|
|
retval += ","
|
|
|
|
retval += item
|
|
|
|
if retval:
|
|
|
|
return " (%s)" % retval
|
|
|
|
return ""
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def display(self, date):
|
2005-01-12 21:23:31 +00:00
|
|
|
"""
|
2008-02-24 13:55:55 +00:00
|
|
|
Return a text string representing the date.
|
2005-01-12 21:23:31 +00:00
|
|
|
"""
|
|
|
|
mod = date.get_modifier()
|
|
|
|
cal = date.get_calendar()
|
|
|
|
qual = date.get_quality()
|
|
|
|
start = date.get_start_date()
|
2009-01-17 14:33:10 +00:00
|
|
|
newyear = date.get_new_year()
|
2005-01-12 21:23:31 +00:00
|
|
|
|
|
|
|
qual_str = self._qual_str[qual]
|
|
|
|
|
|
|
|
if mod == Date.MOD_TEXTONLY:
|
|
|
|
return date.get_text()
|
|
|
|
elif start == Date.EMPTY:
|
|
|
|
return ""
|
|
|
|
elif mod == Date.MOD_SPAN or mod == Date.MOD_RANGE:
|
|
|
|
d1 = self.display_iso(start)
|
|
|
|
d2 = self.display_iso(date.get_stop_date())
|
2009-01-17 14:33:10 +00:00
|
|
|
scal = self.format_extras(cal, newyear)
|
|
|
|
return "%s %s - %s%s" % (qual_str, d1, d2, scal)
|
2005-01-12 21:23:31 +00:00
|
|
|
else:
|
|
|
|
text = self.display_iso(start)
|
2009-01-17 14:33:10 +00:00
|
|
|
scal = self.format_extras(cal, newyear)
|
|
|
|
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
|
2005-01-12 21:23:31 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _slash_year(self, val, slash):
|
2005-01-12 21:23:31 +00:00
|
|
|
if val < 0:
|
|
|
|
val = - val
|
|
|
|
|
|
|
|
if slash:
|
2008-04-19 03:39:58 +00:00
|
|
|
if (val-1) % 100 == 99:
|
|
|
|
year = "%d/%d" % (val - 1, (val%1000))
|
|
|
|
elif (val-1) % 10 == 9:
|
|
|
|
year = "%d/%d" % (val - 1, (val%100))
|
2006-05-01 21:11:26 +00:00
|
|
|
else:
|
2008-04-19 03:39:58 +00:00
|
|
|
year = "%d/%d" % (val - 1, (val%10))
|
2005-01-12 21:23:31 +00:00
|
|
|
else:
|
2005-05-24 13:08:06 +00:00
|
|
|
year = "%d" % (val)
|
|
|
|
|
2005-12-06 06:38:09 +00:00
|
|
|
return year
|
2005-01-12 21:23:31 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def display_iso(self, date_val):
|
2005-01-12 21:23:31 +00:00
|
|
|
# YYYY-MM-DD (ISO)
|
2007-06-27 04:50:33 +00:00
|
|
|
year = self._slash_year(date_val[2], date_val[3])
|
2008-01-14 08:10:24 +00:00
|
|
|
# This produces 1789, 1789-00-11 and 1789-11-00 for incomplete dates.
|
2008-06-16 15:01:46 +00:00
|
|
|
if date_val[0] == date_val[1] == 0:
|
2008-01-14 08:10:24 +00:00
|
|
|
# No month and no day -> year
|
|
|
|
value = year
|
2005-01-12 21:23:31 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%s-%02d-%02d" % (year, date_val[1], date_val[0])
|
2005-12-06 06:38:09 +00:00
|
|
|
if date_val[2] < 0:
|
|
|
|
return self._bce_str % value
|
|
|
|
else:
|
|
|
|
return value
|
2005-01-12 21:23:31 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def text_display(self, date):
|
2004-09-17 03:30:04 +00:00
|
|
|
"""
|
|
|
|
Similar to the display task, except that if the value is a text only
|
|
|
|
value, it is enclosed in quotes.
|
|
|
|
"""
|
|
|
|
return date.get_text()
|
|
|
|
|
2005-01-12 21:23:31 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _display_gregorian(self, date_val):
|
|
|
|
year = self._slash_year(date_val[2], date_val[3])
|
2004-09-17 03:30:04 +00:00
|
|
|
if self.format == 0:
|
2005-12-06 06:38:09 +00:00
|
|
|
return self.display_iso(date_val)
|
2004-09-17 03:30:04 +00:00
|
|
|
elif self.format == 1:
|
2006-05-01 21:11:26 +00:00
|
|
|
if date_val[3]:
|
|
|
|
return self.display_iso(date_val)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2008-06-16 15:01:46 +00:00
|
|
|
if date_val[0] == date_val[1] == 0:
|
2006-05-01 21:11:26 +00:00
|
|
|
value = str(date_val[2])
|
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = self._tformat.replace('%m', str(date_val[1]))
|
|
|
|
value = value.replace('%d', str(date_val[0]))
|
|
|
|
value = value.replace('%Y', str(abs(date_val[2])))
|
|
|
|
value = value.replace('-', '/')
|
2004-09-17 03:30:04 +00:00
|
|
|
elif self.format == 2:
|
|
|
|
# Month Day, Year
|
|
|
|
if date_val[0] == 0:
|
|
|
|
if date_val[1] == 0:
|
2004-10-03 21:04:54 +00:00
|
|
|
value = year
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%s %s" % (self._months[date_val[1]], year)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%s %d, %s" % (self._months[date_val[1]],
|
|
|
|
date_val[0], year)
|
2004-09-17 03:30:04 +00:00
|
|
|
elif self.format == 3:
|
|
|
|
# MON Day, Year
|
|
|
|
if date_val[0] == 0:
|
|
|
|
if date_val[1] == 0:
|
2004-10-03 21:04:54 +00:00
|
|
|
value = year
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%s %s" % (self.MONS[date_val[1]], year)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%s %d, %s" % (self.MONS[date_val[1]],
|
|
|
|
date_val[0], year)
|
2004-09-17 03:30:04 +00:00
|
|
|
elif self.format == 4:
|
|
|
|
# Day Month Year
|
|
|
|
if date_val[0] == 0:
|
|
|
|
if date_val[1] == 0:
|
2004-10-03 21:04:54 +00:00
|
|
|
value = year
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%s %s" % (self._months[date_val[1]], year)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%d %s %s" % (date_val[0], self._months[date_val[1]],
|
|
|
|
year)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
|
|
|
# Day MON Year
|
|
|
|
if date_val[0] == 0:
|
|
|
|
if date_val[1] == 0:
|
2004-10-03 21:04:54 +00:00
|
|
|
value = year
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%s %s" % (self.MONS[date_val[1]], year)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = "%d %s %s" % (date_val[0], self.MONS[date_val[1]], year)
|
2005-12-06 06:38:09 +00:00
|
|
|
if date_val[2] < 0:
|
|
|
|
return self._bce_str % value
|
|
|
|
else:
|
|
|
|
return value
|
2004-09-17 03:30:04 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _display_julian(self, date_val):
|
2004-09-17 03:30:04 +00:00
|
|
|
# Julian date display is the same as Gregorian
|
|
|
|
return self._display_gregorian(date_val)
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _display_calendar(self, date_val, month_list):
|
2005-12-06 06:38:09 +00:00
|
|
|
year = abs(date_val[2])
|
2004-09-17 03:30:04 +00:00
|
|
|
if self.format == 0 or self.format == 1:
|
2005-01-12 21:23:31 +00:00
|
|
|
return self.display_iso(date_val)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
|
|
|
if date_val[0] == 0:
|
|
|
|
if date_val[1] == 0:
|
2005-12-06 06:38:09 +00:00
|
|
|
value = year
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = u"%s %d" % (month_list[date_val[1]], year)
|
2004-09-17 03:30:04 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = u"%s %d, %s" % (month_list[date_val[1]], date_val[0], year)
|
2005-12-06 06:38:09 +00:00
|
|
|
if date_val[2] < 0:
|
|
|
|
return self._bce_str % value
|
|
|
|
else:
|
|
|
|
return value
|
2004-09-17 03:30:04 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _display_french(self, date_val):
|
2005-12-06 06:38:09 +00:00
|
|
|
year = abs(date_val[2])
|
|
|
|
if self.format == 0 or self.format == 1:
|
|
|
|
return self.display_iso(date_val)
|
|
|
|
else:
|
|
|
|
if date_val[0] == 0:
|
|
|
|
if date_val[1] == 0:
|
|
|
|
value = year
|
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = u"%s %d" % (self.french[date_val[1]], year)
|
2005-12-06 06:38:09 +00:00
|
|
|
else:
|
2007-06-27 04:50:33 +00:00
|
|
|
value = u"%d %s %s" % (date_val[0], self.french[date_val[1]], year)
|
2005-12-06 06:38:09 +00:00
|
|
|
if date_val[2] < 0:
|
|
|
|
return self._bce_str % value
|
|
|
|
else:
|
|
|
|
return value
|
2004-09-17 03:30:04 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _display_hebrew(self, date_val):
|
|
|
|
return self._display_calendar(date_val, self.hebrew)
|
2004-09-17 03:30:04 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _display_persian(self, date_val):
|
|
|
|
return self._display_calendar(date_val, self.persian)
|
2004-09-17 03:30:04 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def _display_islamic(self, date_val):
|
|
|
|
return self._display_calendar(date_val, self.islamic)
|
2005-01-19 00:13:57 +00:00
|
|
|
|
2009-01-19 20:09:19 +00:00
|
|
|
def _display_swedish(self, date_val):
|
|
|
|
return self._display_calendar(date_val, self.swedish)
|
|
|
|
|
2005-01-19 00:13:57 +00:00
|
|
|
class DateDisplayEn(DateDisplay):
|
|
|
|
"""
|
|
|
|
English language date display class.
|
|
|
|
"""
|
|
|
|
|
|
|
|
formats = (
|
2007-06-27 04:50:33 +00:00
|
|
|
"YYYY-MM-DD (ISO)", "Numerical", "Month Day, Year",
|
2005-06-05 04:01:56 +00:00
|
|
|
"MON DAY, YEAR", "Day Month Year", "DAY MON YEAR"
|
2005-01-19 00:13:57 +00:00
|
|
|
)
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def __init__(self, format=None):
|
2005-01-19 00:13:57 +00:00
|
|
|
"""
|
2008-02-24 13:55:55 +00:00
|
|
|
Create a DateDisplay class that converts a Date object to a string
|
2005-01-19 00:13:57 +00:00
|
|
|
of the desired format. The format value must correspond to the format
|
|
|
|
list value (DateDisplay.format[]).
|
|
|
|
"""
|
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
DateDisplay.__init__(self, format)
|
2005-01-19 00:13:57 +00:00
|
|
|
|
2007-06-27 04:50:33 +00:00
|
|
|
def display(self, date):
|
2005-01-19 00:13:57 +00:00
|
|
|
"""
|
2008-02-24 13:55:55 +00:00
|
|
|
Return a text string representing the date.
|
2005-01-19 00:13:57 +00:00
|
|
|
"""
|
|
|
|
mod = date.get_modifier()
|
|
|
|
cal = date.get_calendar()
|
|
|
|
qual = date.get_quality()
|
|
|
|
start = date.get_start_date()
|
2009-01-17 14:33:10 +00:00
|
|
|
newyear = date.get_new_year()
|
2005-01-19 00:13:57 +00:00
|
|
|
|
|
|
|
qual_str = self._qual_str[qual]
|
|
|
|
|
|
|
|
if mod == Date.MOD_TEXTONLY:
|
|
|
|
return date.get_text()
|
|
|
|
elif start == Date.EMPTY:
|
|
|
|
return ""
|
|
|
|
elif mod == Date.MOD_SPAN:
|
|
|
|
d1 = self.display_cal[cal](start)
|
|
|
|
d2 = self.display_cal[cal](date.get_stop_date())
|
2009-01-17 14:33:10 +00:00
|
|
|
scal = self.format_extras(cal, newyear)
|
|
|
|
return "%sfrom %s to %s%s" % (qual_str, d1, d2, scal)
|
2005-01-19 00:13:57 +00:00
|
|
|
elif mod == Date.MOD_RANGE:
|
|
|
|
d1 = self.display_cal[cal](start)
|
|
|
|
d2 = self.display_cal[cal](date.get_stop_date())
|
2009-01-17 14:33:10 +00:00
|
|
|
scal = self.format_extras(cal, newyear)
|
|
|
|
return "%sbetween %s and %s%s" % (qual_str, d1, d2, scal)
|
2005-01-19 00:13:57 +00:00
|
|
|
else:
|
|
|
|
text = self.display_cal[date.get_calendar()](start)
|
2009-01-17 14:33:10 +00:00
|
|
|
scal = self.format_extras(cal, newyear)
|
|
|
|
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
|