Mercurial > hg > cc > azure
changeset 41:3313edbab3b0
simpler fix for d-o-m default
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Fri, 30 Nov 2018 13:44:50 +0000 |
parents | 4cf6bc21f683 |
children | 1d776e96c16a |
files | master/bin/fixDates.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/master/bin/fixDates.py Fri Nov 30 13:43:36 2018 +0000 +++ b/master/bin/fixDates.py Fri Nov 30 13:44:50 2018 +0000 @@ -41,9 +41,10 @@ except: # Unusual month or year field try: - # day 1 is because w/o it the default is today's is used, which may + # settings is because w/o it the default is today's is used, which may # fail if it's e.g. 31 March today and the string is "April 2017" - d=parse("1 %s %s"%(ff.group(2),ff.group(3)))#,languages=['en']) + d=parse("%s %s"%(ff.group(2),ff.group(3)), + settings={'PREFER_DAY_OF_MONTH': 'first'}) if d is None or count is None: print(5,ff.group(1),ff.group(2),ff.group(3),ff.group(4), file=sys.stderr) @@ -87,7 +88,8 @@ else: l=' '.join(cols) try: - d=parse(l)#,languages=['en'])) + d=parse(l, + settings={'PREFER_DAY_OF_MONTH': 'first'}) if d is None: print(3,sn[scheme],l,count,file=sys.stderr) bogons+=1