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

BUG: Lucene.Net.QueryParser.Flexible.Standard: Fixed calendar handling on .NET Core #551

Merged

Conversation

NightOwl888
Copy link
Contributor

  • Fixed calendar check so we don't produce random numbers that are out of bounds of the calendar of the random culture
  • Added TimeZone support
  • BREAKING: Changed constructors of Lucene.Net.Util.NumberFormat and Lucene.Net.QueryParsers.Flexible.Standard.Config.NumberDateFormat to accept IFormatProvider rather than CultureInfo and changed NumberFormat.Culture property to NumberFormat.FormatProvider.

…: Fixed support for non-Gregorian calendars, which were causing random failures in Lucene.Net.QueryParser.Flexible.Standard.TestNumericQueryParser. Also added TODOs about fixing time zone.
…: Added bounds checks for random date generation to ensure they are within the range of the test culture's calendar.
…le.Standard.Config.NumberDateFormat: Widened constructors to use IFormatProvider instead of CultureInfo and changed Culture property to FormatProvider. Added support for time zones to NumberDateFormat.
…: Write out formatter output for debug purposes.
@NightOwl888 NightOwl888 force-pushed the fix/queryparser-numberdateformat branch from 1488fc3 to 3f1f368 Compare November 25, 2021 05:23
…e TimeZoneInfo during parsing and when selecting random dates
…::BeforeClass(): Corrected date format string to explicitly specify era and to include minutes in the time zone offset, which was preventing round-tripping from working correctly.
…e full time zone (including minutes) for FULL time
…ded support for converting unspecified time zones to the specified time zone + tests.
@NightOwl888 NightOwl888 merged commit 5864780 into apache:master Dec 3, 2021
@NightOwl888 NightOwl888 added this to the 4.8.0-beta00016 milestone Feb 12, 2022
@NightOwl888 NightOwl888 mentioned this pull request Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant