equal
deleted
inserted
replaced
1350 return date |
1350 return date |
1351 if not formats: |
1351 if not formats: |
1352 formats = defaultdateformats |
1352 formats = defaultdateformats |
1353 date = date.strip() |
1353 date = date.strip() |
1354 |
1354 |
1355 if date == _('now'): |
1355 if date == 'now' or date == _('now'): |
1356 return makedate() |
1356 return makedate() |
1357 if date == _('today'): |
1357 if date == 'today' or date == _('today'): |
1358 date = datetime.date.today().strftime('%b %d') |
1358 date = datetime.date.today().strftime('%b %d') |
1359 elif date == _('yesterday'): |
1359 elif date == 'yesterday' or date == _('yesterday'): |
1360 date = (datetime.date.today() - |
1360 date = (datetime.date.today() - |
1361 datetime.timedelta(days=1)).strftime('%b %d') |
1361 datetime.timedelta(days=1)).strftime('%b %d') |
1362 |
1362 |
1363 try: |
1363 try: |
1364 when, offset = map(int, date.split(' ')) |
1364 when, offset = map(int, date.split(' ')) |