-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDateInterface.php
More file actions
42 lines (36 loc) · 736 Bytes
/
DateInterface.php
File metadata and controls
42 lines (36 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
namespace SonsOfPHP\Component\Clock;
/**
* YYYY-MM-DD.
*
* @author Joshua Estes <joshua@sonsofphp.com>
*/
interface DateInterface
{
/**
* Returns the date formated in {Year}-{Month}-{Day}. The date
* will contain leading zeros for month and day.
*/
public function toString(): string;
/**
* Returns the Year.
*
* ie 2022
*/
public function getYear(): int;
/**
* Returns the Month. It does not have a leading zero.
*
* ie 8
*
* @returns int
*/
public function getMonth(): int;
/**
* Returns the Day. It does not have a leading zero.
*
* ie 25
*/
public function getDay(): int;
}