### Elasticsearch Version

8.4.2

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

`Linux yrodiere.redhat 5.19.8-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 8 19:02:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`

### Problem Description

Since Elasticsearch 8.4.2, running a `match` query on a field of type `date` with format `uuuu` will give strange results for years below 1971, similar to running a range query with the range `[<your year>, 1970]`.

Yes, that's very weird.

This bug was not present in Elasticsearch 8.4.1.

### Steps to Reproduce

```shell
# Just to make it easier to re-run the test
curl -XDELETE localhost:9200/mytest/\?pretty 1>&2 2>/dev/null || true
# Property of type `date` with format `uuuu`
curl -XPUT -H "Content-Type: application/json" localhost:9200/mytest/\?pretty -d'{"mappings":{"properties":{"myyear":{"type":"date","format":"uuuu"}}}}'
# Index year 1971
curl -XPUT -H "Content-Type: application/json" localhost:9200/mytest/_doc/1\?pretty\&refresh=true -d'{"myyear":"1971"}'
# Index two different years below 1971
curl -XPUT -H "Content-Type: application/json" localhost:9200/mytest/_doc/2\?pretty\&refresh=true -d'{"myyear":"1970"}'
curl -XPUT -H "Content-Type: application/json" localhost:9200/mytest/_doc/3\?pretty\&refresh=true -d'{"myyear":"1969"}'
curl -XPUT -H "Content-Type: application/json" localhost:9200/mytest/_doc/4\?pretty\&refresh=true -d'{"myyear":"1500"}'
curl -XPUT -H "Content-Type: application/json" localhost:9200/mytest/_doc/6\?pretty\&refresh=true -d'{"myyear":"0050"}'
curl -XPUT -H "Content-Type: application/json" localhost:9200/mytest/_doc/7\?pretty\&refresh=true -d'{"myyear":"-42"}'
# Search for year 1970: only 1970 matches
curl -XPOST -H "Content-Type: application/json" localhost:9200/mytest/_search\?pretty -d'{"query":{"match":{"myyear":{"query":"1970"}}}}'
# Search for year 1969: both 1969 and 1970 match (???) but not 1971
curl -XPOST -H "Content-Type: application/json" localhost:9200/mytest/_search\?pretty -d'{"query":{"match":{"myyear":{"query":"1970"}}}}'
# Search for year 1500: 1500, 1969 and 1970 match (???) but not 1971
curl -XPOST -H "Content-Type: application/json" localhost:9200/mytest/_search\?pretty -d'{"query":{"match":{"myyear":{"query":"1500"}}}}'
# Search for year 0001: 0050, 1500, 1969 and 1970 match (???) but not 1971
curl -XPOST -H "Content-Type: application/json" localhost:9200/mytest/_search\?pretty -d'{"query":{"match":{"myyear":{"query":"0001"}}}}'
```

### Logs (if relevant)

(Incorrect) result of the last two requests in the script above with Elasticsearch 8.4.2:

```json
{
  "took" : 1,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 3,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "mytest",
        "_id" : "2",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "1970"
        }
      },
      {
        "_index" : "mytest",
        "_id" : "3",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "1969"
        }
      },
      {
        "_index" : "mytest",
        "_id" : "4",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "1500"
        }
      }
    ]
  }
}
{
  "took" : 2,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 4,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "mytest",
        "_id" : "2",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "1970"
        }
      },
      {
        "_index" : "mytest",
        "_id" : "3",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "1969"
        }
      },
      {
        "_index" : "mytest",
        "_id" : "4",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "1500"
        }
      },
      {
        "_index" : "mytest",
        "_id" : "6",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "0050"
        }
      }
    ]
  }
}
```

(Correct) result of the last two requests in the script above with Elasticsearch 8.4.1:

```json
{
  "took" : 3,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "mytest",
        "_id" : "4",
        "_score" : 1.0,
        "_source" : {
          "myyear" : "1500"
        }
      }
    ]
  }
}
{
  "took" : 2,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 0,
      "relation" : "eq"
    },
    "max_score" : null,
    "hits" : [ ]
  }
}

```
server/src/test/java/org/elasticsearch/common/time/DateFormattersTests.java
assertParses("12:12:12", "hour_minute_second");
        assertParses("12:12:01", "hour_minute_second");
        assertParses("12:12:1", "hour_minute_second");
        assertParses("12:12:12.123", "hour_minute_second_fraction");
        assertParses("12:12:12.123456789", "hour_minute_second_fraction");
        assertParses("12:12:12.1", "hour_minute_second_fraction");
        assertParseException("12:12:12", "hour_minute_second_fraction");
        assertParses("12:12:12.123", "hour_minute_second_millis");
        assertParseException("12:12:12.123456789", "hour_minute_second_millis");
        assertParses("12:12:12.1", "hour_minute_second_millis");
        assertParseException("12:12:12", "hour_minute_second_millis");
        assertParses("2018-128", "ordinal_date");
        assertParses("2018-1", "ordinal_date");
        assertParses("2018-128T10:15:30.1Z", "ordinal_date_time");
        assertParses("2018-128T10:15:30.123Z", "ordinal_date_time");
        assertParses("2018-128T10:15:30.123456789Z", "ordinal_date_time");
        assertParses("2018-128T10:15:30.123+0100", "ordinal_date_time");
        assertParses("2018-128T10:15:30.123+01:00", "ordinal_date_time");
        assertParses("2018-1T10:15:30.1Z", "ordinal_date_time");
        assertParses("2018-1T10:15:30.123Z", "ordinal_date_time");
        assertParses("2018-1T10:15:30.123456789Z", "ordinal_date_time");
        assertParses("2018-1T10:15:30.123+0100", "ordinal_date_time");
        assertParses("2018-1T10:15:30.123+01:00", "ordinal_date_time");
        assertParses("2018-128T10:15:30Z", "ordinal_date_time_no_millis");
        assertParses("2018-128T10:15:30+0100", "ordinal_date_time_no_millis");
        assertParses("2018-128T10:15:30+01:00", "ordinal_date_time_no_millis");
        assertParses("2018-1T10:15:30Z", "ordinal_date_time_no_millis");
        assertParses("2018-1T10:15:30+0100", "ordinal_date_time_no_millis");
        assertParses("2018-1T10:15:30+01:00", "ordinal_date_time_no_millis");
        assertParses("10:15:30.1Z", "time");