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

"5,30 pm" not recognized by dates(), returns 15 PM #1015

Open
pietrociatta opened this issue May 24, 2023 · 1 comment
Open

"5,30 pm" not recognized by dates(), returns 15 PM #1015

pietrociatta opened this issue May 24, 2023 · 1 comment
Labels

Comments

@pietrociatta
Copy link

I found an issue while testing some possibile users input, and what i would normally write would be "let's meet at 5,30 pm" but it only recognize 5:30 pm.
This is my code:

 let doc = nlp("let's meet at 5,30 pm");
    const jsonDate = doc.dates().get()[0];
output: {
    "start": "2023-05-24T15:00:00.000+02:00",
    "end": "2023-05-24T15:00:00.000+02:00",
    "timezone": "Europe/Rome",
    "duration": {
        "years": 0,
        "months": 0,
        "days": 0,
        "hours": 0,
        "minutes": 0
    }
}

I cannot see if the issue is mine because on compromise.cool example the calendar only specifies the date
Same problem also with 5.30 pm

@spencermountain
Copy link
Owner

thanks pietrociatta - is 5,30 a custom in some countries? I've never seen that before.
You're right- unfortunately there is no way to define custom date interpreters for things like this. There should be!

I'm cautious about doing both 5,30 and 5.30 because it will interfere with the number parser - both of these are valid numbers. Open to it though, if you know something I don't.
cheers

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