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

Prioritize DD/MM/YYYY format over MM/DD/YYYY format in results for english datetime recognizer #3134

Closed
Tracked by #3143
Kevv-J opened this issue Aug 11, 2023 · 1 comment

Comments

@Kevv-J
Copy link

Kevv-J commented Aug 11, 2023

Describe the bug
Unable to prioritize non-US datetime format result (DD/MM/YYYY over MM/DD/YYYY) for ambiguous dates which can be interpreted as both DD/MM/YYYY and MM/DD/YYYY. example 10/08/2023 can be 10th Aug or 8th Oct

To Reproduce
Steps to reproduce the behavior:

  1. Send "10/08/2023" as input to recognize_datetime()
  2. it recognizes the date as 2023-10-08 (YYYY-MM-DD ie: 8th October 2023)

Expected behavior
For most English Speaking countries (non-US) it is expected to be interpreted as 2023-08-10 (ie: 10th August 2023)

Platform :

  • Platform: Python,
  • Environment: botframework-python
  • Version of package v1.0.2a2

Additional context
I am looking for a way to specify DD/MM/YYYY to be default format to be recognized along with common English phrases like "day after tomorrow" "yesterday" etc which work with "en-US"

@tellarin
Copy link
Collaborator

@Kevv-J This is already supported. You can pass en-UK or Culture.EnglishOthers to the recognizers and the DMY format will be prioritized.

@Qqqq0qw Qqqq0qw mentioned this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants