1<?php
2
3namespace Sabre\VObject\Property\VCard;
4
5/**
6 * Date property.
7 *
8 * This object encodes vCard DATE values.
9 *
10 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
11 * @author Evert Pot (http://evertpot.com/)
12 * @license http://sabre.io/license/ Modified BSD License
13 */
14class Date extends DateAndOrTime
15{
16    /**
17     * Returns the type of value.
18     *
19     * This corresponds to the VALUE= parameter. Every property also has a
20     * 'default' valueType.
21     *
22     * @return string
23     */
24    public function getValueType()
25    {
26        return 'DATE';
27    }
28
29    /**
30     * Sets the property as a DateTime object.
31     *
32     * @param \DateTimeInterface $dt
33     */
34    public function setDateTime(\DateTimeInterface $dt)
35    {
36        $this->value = $dt->format('Ymd');
37    }
38}
39