Revert "improve the "main" routine which prints all the date formats"

This reverts commit 0c144c97a9.
This commit is contained in:
Nick Hall 2017-02-23 00:09:19 +00:00
parent b8ba05540e
commit 0599539d09

View File

@ -97,20 +97,14 @@ except:
from ._dateutils import *
from ._grampslocale import (codeset, tformat)
# set GRAMPS_RESOURCES then: python3 -m gramps.gen.datehandler.__init__
if __name__ == "__main__":
from ._datedisplay import DateDisplay
m = 0
date_handlers = sorted(LANG_TO_DISPLAY.items())
for l,d in date_handlers:
if len(l) != 2 and l not in ('zh_TW'): # Chinese has two date_handlers
for l,d in LANG_TO_DISPLAY.items():
if len(l) != 2:
continue
if l.upper() == l and (l.lower(),d) in date_handlers:
continue # don't need to see the upper-case variant also
m = max(m, len(d.formats))
print("{}: {} {} own-f:{} own-dc:{} own-dg:{}".format(
print("{}: {} {} own dg: {}".format(
l, len(d.formats), d.formats,
d.formats != DateDisplay.formats,
d._display_calendar != DateDisplay._display_calendar,
d._display_gregorian != DateDisplay._display_gregorian))
print("MAX: ", m)