Skip to content

Negative dateinterval #33052

Closed
Closed
@z31fbras

Description

@z31fbras

Symfony version(s) affected: 4.4.X

Description
The Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer does not accept negative dateinterval.
On the other hand, Doctrine\DBAL\Types\DateIntervalType, can deal with negative dateinterval.

Although, the ISO 8601 allows negative values to be defined.

Is it a wanted behaviour?
Do I misundestand something?

Thanks a lot for your help!

Possible Solution
Accept negative values on this normalizer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions