1 | <?php |
||
34 | class Birthday extends DateTime |
||
35 | { |
||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | protected $hasDate = false; |
||
40 | |||
41 | /** |
||
42 | * @var bool |
||
43 | */ |
||
44 | protected $hasYear = false; |
||
45 | |||
46 | /** |
||
47 | * Parses Graph birthday format to set indication flags, possible values: |
||
48 | * |
||
49 | * MM/DD/YYYY |
||
50 | * MM/DD |
||
51 | * YYYY |
||
52 | * |
||
53 | * @link https://developers.facebook.com/docs/graph-api/reference/user |
||
54 | * |
||
55 | * @param string $date |
||
56 | * @param DateTimeZone $timezone |
||
57 | */ |
||
58 | public function __construct($date, DateTimeZone $timezone = null) |
||
72 | |||
73 | /** |
||
74 | * Returns whether date object contains birth day and month |
||
75 | * |
||
76 | * @return bool |
||
77 | */ |
||
78 | public function hasDate() |
||
82 | |||
83 | /** |
||
84 | * Returns whether date object contains birth year |
||
85 | * |
||
86 | * @return bool |
||
87 | */ |
||
88 | public function hasYear() |
||
92 | } |
||
93 |