tests/test-parse-date.t
changeset 18537 ae60735e37d2
parent 16923 dfaf869824f8
child 18614 b2586e2cc67a
equal deleted inserted replaced
18536:ae645d4f084c 18537:ae60735e37d2
   232   Sun Jun 11 00:26:40 2006 -0400
   232   Sun Jun 11 00:26:40 2006 -0400
   233   Sat Apr 15 13:30:00 2006 +0200
   233   Sat Apr 15 13:30:00 2006 +0200
   234   Sat Apr 15 13:30:00 2006 +0000
   234   Sat Apr 15 13:30:00 2006 +0000
   235   Wed Feb 01 13:00:30 2006 -0500
   235   Wed Feb 01 13:00:30 2006 -0500
   236   Wed Feb 01 13:00:30 2006 +0000
   236   Wed Feb 01 13:00:30 2006 +0000
       
   237 
       
   238 Test issue 3764 (interpreting 'today' and 'yesterday')
       
   239   $ echo "hello" >> a
       
   240   >>> import datetime
       
   241   >>> today = datetime.date.today().strftime("%b %d")
       
   242   >>> yesterday = (datetime.date.today() - datetime.timedelta(days=1)).strftime("%b %d")
       
   243   >>> dates = open('dates', 'w')
       
   244   >>> dates.write(today + '\n')
       
   245   >>> dates.write(yesterday)
       
   246   >>> dates.close()
       
   247   $ hg ci -d "`sed -n '1p' dates`" -m "today is a good day to code"
       
   248   $ hg log -d today --template '{desc}\n'
       
   249   today is a good day to code
       
   250   $ echo "goodbye" >> a
       
   251   $ hg ci -d "`sed -n '2p' dates`" -m "the time traveler's code"
       
   252   $ hg log -d yesterday --template '{desc}\n'
       
   253   the time traveler's code