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