wanasit / chrono

A natural language date parser in Javascript
MIT License
4.55k stars 340 forks source link

"them later" is parsed as "1 minute later", starting from v2.5.1 #565

Closed jerry2013 closed 2 weeks ago

jerry2013 commented 1 month ago

on v2.5.0 - nothing is found, as expected.

on v2.5.1 (all the way to the current release v2.7.6):

> chrono.parse('tell them later', new Date('2024-01-01Z'))
[
  ParsingResult {
    reference: ReferenceWithTimezone { instant: 2024-01-01T00:00:00.000Z },
    refDate: 2024-01-01T00:00:00.000Z,
    index: 5,
    text: 'them later',
    start: ParsingComponents {
      reference: [ReferenceWithTimezone],
      knownValues: [Object],
      impliedValues: {}
    },
    end: null
  }
]

ps. tell him later has no result as expected in all versions.

wanasit commented 2 weeks ago

Thanks for reporting.

I fixed this in 08e4dc4.