Symfony unique year in datetime
<p>is there any chance to check if the year is unique in datetime format?
I've set my unique validator from doctrine validator for unique entity, but it checks for complete date, so if i keep the same year and change the date, it will pass the validation.</p>

<pre><code>use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
 * Movie
 *
 * @UniqueEntity("name", message="This movie is already in the base")
 * @UniqueEntity("releaseDate", message="Best movie from this year is already in the base")
 * @ORM\Table(name="movie")
 * @ORM\Entity(repositoryClass="AppBundle\Repository\MovieRepository")
 */
class Movie
{
    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255, unique=true)
     */
    private $name;


    /**
     * @var \DateTime
     *
     * @ORM\Column(name="release_date", type="date", unique=true)
     */
    private $releaseDate;
</code></pre>