andrew-morris / parsedatetime

Automatically exported from code.google.com/p/parsedatetime
0 stars 0 forks source link

Parsing weekday names is relative to current, not given, date #38

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Sample transcript:

>>> import parsedatetime.parsedatetime as pdt
>>> cal = pdt.Calendar()
>>> from datetime import datetime
>>> dt = datetime(2011,8,8)
>>> cal.parse("Fri", dt)
(time.struct_time(tm_year=2011, tm_mon=2, tm_mday=4, tm_hour=12, tm_min=9, 
tm_sec=54, tm_wday=4, tm_yday=35, tm_isdst=-1), 1)

I would expect this to result in Friday August 12, 2011, rather than something 
in February.

Original issue reported on code.google.com by andreas.kloeckner@gmail.com on 1 Feb 2011 at 5:12