Project

General

Profile

« Previous | Next » 

Revision 1580

xml_func.py: _date: Use format.str2int instead of int to convert date parts to int so that strange formatting will be parsed correctly

View differences:

lib/xml_func.py
6 6

  
7 7
import dates
8 8
import exc
9
import format
9 10
import maps
10 11
import strings
11 12
import term
......
267 268
            if not month.isdigit(): # month is name
268 269
                items['month'] = str(dates.strtotime(month).month)
269 270
        
270
        items = dict(conv_items(int, items.iteritems()))
271
        items = dict(conv_items(format.str2int, items.iteritems()))
271 272
        items.setdefault('month', 1)
272 273
        items.setdefault('day', 1)
273 274
        

Also available in: Unified diff