mercurial/util.py
changeset 24188 5a7920c4d2ea
parent 24164 07a92bbd02e5
child 24236 de14c3972c2f
equal deleted inserted replaced
24187:30219bd46ed7 24188:5a7920c4d2ea
  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(' '))