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

[EN DateTimeV2] Issue recognizing dates in non-standard form (year missed) #3078

Open
SabreeswaranI opened this issue Mar 1, 2023 · 0 comments

Comments

@SabreeswaranI
Copy link

Describe the bug
We are using dot net version, The problem is that there is some problems with recognizing statements that start with year first '2014, Feb 17' or '2014 Feb 17', its able to pickup the month and day but its not picking up the year.

To Reproduce
Use below phrases

  1. "2014, Feb 17 Lorem Ipsum is simply dummy text of the printing and typesetting industry."
  2. "2014 Feb 17 Lorem Ipsum is simply dummy text of the printing and typesetting industry."

Expected behavior
It should pickup the year also and return "17-03-2014".

Sample input/output
As applicable, add examples of text input and json output to help explain the problem.

Platform (please complete the following information):

  • Platform: .NET
  • Environment: nuget package
  • Version of package v1.8.6

Additional context
Right now i resolve it using regex pattern replace like below:
Regex.Replace(input, @"\b(?<year>\d{2,4})\s(?<month>[a-z]{3,9})\s(?<day>\d{1,2})\b", "${day}-${month}-${year}", RegexOptions.IgnoreCase, TimeSpan.FromMilliseconds(150));

@tellarin tellarin changed the title Date Time Recognize Error [EN DateTimeV2] Issue recognizing dates in non-standard form (year missed) Mar 18, 2023
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

1 participant