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    function getValueType() {
25
26        return 'DATE';
27
28    }
29
30    /**
31     * Sets the property as a DateTime object.
32     *
33     * @param \DateTimeInterface $dt
34     *
35     * @return void
36     */
37    function setDateTime(\DateTimeInterface $dt) {
38
39        $this->value = $dt->format('Ymd');
40
41    }
42
43}
44