We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I try to parse a date before today (e.g. 7/28), the parsed year is returned as next year, regardless of the YearParseStyle option.
>>> import parsedatetime >>> config = parsedatetime.Constants() >>> config.YearParseStyle = 0 >>> calendar = parsedatetime.Calendar(config) >>> calendar.parse('7/28') DEBUG:parsedatetime:parse() DEBUG:parsedatetime:parse (top of loop): [7/28][] DEBUG:parsedatetime:parse (modifier) [][][] DEBUG:parsedatetime:parse (units) [][][] DEBUG:parsedatetime:parse (qunits) [][][] DEBUG:parsedatetime:parse (date3) [][][] DEBUG:parsedatetime:parse (date) [7/28][][] DEBUG:parsedatetime:parse (day) [7/28][][] DEBUG:parsedatetime:parse (weekday) [7/28][][] DEBUG:parsedatetime:parse (time) [7/28][][] DEBUG:parsedatetime:parse (meridian) [7/28][][] DEBUG:parsedatetime:parse (hms) [7/28][][] DEBUG:parsedatetime:dateFlag 1, timeFlag 0 DEBUG:parsedatetime:parse (bottom) [][7/28][][] DEBUG:parsedatetime:weekday False, dateStd True, dateStr False, time False, timeStr False, meridian False DEBUG:parsedatetime:dayStr False, modifier False, units False, qunits False DEBUG:parsedatetime:_evalString(7/28, None) DEBUG:parsedatetime:attempt to parse as rfc822 - None DEBUG:parsedatetime:daysInMonth(7, 2016) DEBUG:parsedatetime:parseDate: 2016 7 28 31 DEBUG:parsedatetime:parse() return dateFlag 1 timeFlag 0 totalTime (2016, 7, 28, 11, 19, 58, 2, 210, 1) ((2016, 7, 28, 11, 20, 44, 2, 210, 1), 1)
I would expect the returned year to be 2015.
The text was updated successfully, but these errors were encountered:
207f817
Should works now.
Sorry, something went wrong.
wooo!
No branches or pull requests
If I try to parse a date before today (e.g. 7/28), the parsed year is returned as next year, regardless of the YearParseStyle option.
I would expect the returned year to be 2015.
The text was updated successfully, but these errors were encountered: