Skip to content
New issue

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

Incorrect Parsing of "the money" as a Date #554

Closed
ilDon opened this issue May 21, 2024 · 1 comment
Closed

Incorrect Parsing of "the money" as a Date #554

ilDon opened this issue May 21, 2024 · 1 comment
Labels

Comments

@ilDon
Copy link

ilDon commented May 21, 2024

Chrono incorrectly parses the phrase "the money" as a date in the sentence "do I have the money".

Environment

  • "chrono-node": "^2.7.5"

Steps to Reproduce

  1. Configure a new chrono instance with default settings:
    const configuration = chrono.casual.defaultConfig.createCasualConfiguration(false);
    const chronoInstance = new chrono.Chrono(configuration);
    const forwardFrom = options?.forwardFrom || new Date();
  2. Parse the sentence "do I have the money" with the following settings:
    const result = chronoInstance.parse('do I have the money', {
       forwardDate: true,
       startDayHour: 8
    });
    Expected result: No date should be recognized.
    Actual result: "the money" is incorrectly parsed as a date.

Expected Behavior

The parser should recognize that "the money" is not a date and should not return any date-related information for the given sentence.

Actual Behavior

The parser incorrectly identifies "the money" as a date.

@wanasit wanasit added the bug label Jun 1, 2024
@wanasit
Copy link
Owner

wanasit commented Jun 1, 2024

I cannot reproduce this issue. Could you take a look at the test I added in c5ebdd5?

@wanasit wanasit closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants