Whole file
bear/parsedatetime
The author described this change as “re_sources is lacking of "afternoon" which causes bug”. It counts as a record because the check below fails on the code as it stood at 998169003 and passes on 35569e2f6, with nothing else changed between the two runs.
Projectbear/parsedatetime
Fix saved2015-05-07
Sharing licenceApache-2.0 · LICENSE.txt
Change size+2 −0
What the code was meant to do, written into the code itself as a save note
re_sources is lacking of "afternoon" which causes bug
The change
| 125 | 125 | # to fill in any value to be replace - the current date/time will | |
| 126 | 126 | # already have been populated by the method buildSources | |
| 127 | 127 | self.re_sources = { 'noon': { 'hr': 12, 'mn': 0, 'sec': 0 }, | |
| 128 | + | 'afternoon': { 'hr': 13, 'mn': 0, 'sec': 0 }, | |
| 128 | 129 | 'lunch': { 'hr': 12, 'mn': 0, 'sec': 0 }, | |
| 129 | 130 | 'morning': { 'hr': 6, 'mn': 0, 'sec': 0 }, | |
| 130 | 131 | 'breakfast': { 'hr': 8, 'mn': 0, 'sec': 0 }, | |
| ⋯ | |||
| 624 | 625 | self.re_sources['nachts'] = { 'hr': 21, 'mn': 0, 'sec': 0 } | |
| 625 | 626 | self.re_sources['vanavond'] = { 'hr': 21, 'mn': 0, 'sec': 0 } | |
| 626 | 627 | self.re_sources['vannacht'] = { 'hr': 21, 'mn': 0, 'sec': 0 } | |
| 628 | + | ||
The check that tells the two apart
fail→pass·parsedatetime/tests/TestSimpleDateTimes.py::test::testSpecialTimes
Check file parsedatetime/tests/TestSimpleDateTimes.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it9981690036ccce332cb594b0dcd3bdc785d77c38
Broken version dated2015-04-17
Moduleparsedatetime.pdt_locales
Units changedpdtLocale_base
Fingerprint6cc78ea9baad53e1
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in bear/parsedatetime
- 2014-10-26Short week day abbreviation fix