3.5.0: date field's format property removed?

Today I noticed that the date and time format of my content files were wrong and that my decoupled frontend threw errors due to a different format being returned from the API. I always set them to use ISO 8601 format as this is the default format used by the browser APIs. But then I found they now were saved in ISO 9075. When I checked the documentation, I found that there is now a display property, but that the format property is gone/no longer listed in the documentation.

Did I miss this breaking change being mentioned somewhere in the release announcement? At least I would expect it to be mentioned in the documentation, that this property existed prior 3.5.0 and is no longer supported. I had to check an archived version of the documentation to ensure that I didn’t blindly work with a property that never existed.

Yes, that is indeed a non-documented breaking change, it seems. The value is saved like this:

  'save' => function ($value) {
        $format = $this->time === false ? 'Y-m-d' : 'Y-m-d H:i:s';
        return $this->toContent($value, $format);

with a fixed format.

Don’t know if there is a reason why this property was removed.

@distantnative ?

1 Like

Thanks for pinging me, @pixelijn.

Indeed a breaking change, one that we/I thought was necessary when I worked on the field weeks ago - if I recall correctly, because of a way they started to conflict with the new display option. However, looking back now, I am not so sure anymore this breaking change was even necessary.

Can we move this discussion to a Github issue (https://github.com/getkirby/kirby/issues) or are you both not on Github? I would like to spend some time thinking what would be the best way forward.

And apologies for not finding out about this the proper way. The original PR (https://github.com/getkirby/kirby/pull/2892) actually still had the info about this breaking change, but we lost it on our way to the release notes. Which of course should not have happened.

That works for me. Should I create an issue then or do you, @distantnative?

Would be great if you could open the issue. Thanks!

Issue for reference.