wanasit / chrono

A natural language date parser in Javascript
MIT License
4.6k stars 341 forks source link

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

Closed jerry2013 closed 2 months ago

jerry2013 commented 3 months 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 months ago

Thanks for reporting.

I fixed this in 08e4dc4.