slight tweak to Arabic date handler

This commit is contained in:
Paul Franklin 2017-03-10 18:35:59 -08:00
parent c4f94bf9dc
commit 83a4b553f4

View File

@ -39,6 +39,7 @@ from ..lib.date import Date
from ._dateparser import DateParser from ._dateparser import DateParser
from ._datedisplay import DateDisplay from ._datedisplay import DateDisplay
from ._datehandler import register_datehandler from ._datehandler import register_datehandler
from ..const import ARABIC_COMMA
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -202,6 +203,27 @@ class DateDisplayAR(DateDisplay):
scal = self.format_extras(cal, newyear) scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal) return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
def dd_dformat01(self, date_val):
"""
numerical -- for Arabic dates
"""
value = DateDisplay.dd_dformat01(self, date_val)
return value.replace(',', ARABIC_COMMA)
def dd_dformat02(self, date_val, inflect, long_months):
"""
month_name day, year -- for Arabic dates
"""
value = DateDisplay.dd_dformat02(self, date_val, inflect, long_months)
return value.replace(',', ARABIC_COMMA)
def dd_dformat03(self, date_val, inflect, short_months):
"""
month_abbreviation day, year -- for Arabic dates
"""
value = DateDisplay.dd_dformat03(self, date_val, inflect, short_months)
return value.replace(',', ARABIC_COMMA)
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Register classes # Register classes