Skip to content

Commit d8df7b3

Browse files
committed
[Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
1 parent 4abde4d commit d8df7b3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ConstraintValidator.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
abstract class ConstraintValidator implements ConstraintValidatorInterface
2222
{
2323
/**
24-
* Whether to format {@link \DateTime} objects as RFC-3339 dates
25-
* ("Y-m-d H:i:s").
24+
* Whether to format {@link \DateTime} objects, either with the {@link \IntlDateFormatter}
25+
* (if it is available) or as RFC-3339 dates ("Y-m-d H:i:s").
2626
*/
2727
const PRETTY_DATE = 1;
2828

@@ -69,7 +69,8 @@ protected function formatTypeOf($value)
6969
* in double quotes ("). Objects, arrays and resources are formatted as
7070
* "object", "array" and "resource". If the $format bitmask contains
7171
* the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted
72-
* as RFC-3339 dates ("Y-m-d H:i:s").
72+
* with the {@link \IntlDateFormatter}. If it is not available, they will be
73+
* formatted as RFC-3339 dates ("Y-m-d H:i:s").
7374
*
7475
* Be careful when passing message parameters to a constraint violation
7576
* that (may) contain objects, arrays or resources. These parameters

0 commit comments

Comments
 (0)