forked from vegvari/CalendarTest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCalendarInterface.php
62 lines (52 loc) · 1.09 KB
/
CalendarInterface.php
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace Calendar;
use DateTimeInterface;
interface CalendarInterface
{
/**
* @param DateTimeInterface $datetime
*/
public function __construct(DateTimeInterface $datetime);
/**
* Get the day
*
* @return int
*/
public function getDay();
/**
* Get the weekday (1-7, 1 = Monday)
*
* @return int
*/
public function getWeekDay();
/**
* Get the first weekday of this month (1-7, 1 = Monday)
*
* @return int
*/
public function getFirstWeekDay();
/**
* Get the first week of this month (18th March => 9 because March starts on week 9)
*
* @return int
*/
public function getFirstWeek();
/**
* Get the number of days in this month
*
* @return int
*/
public function getNumberOfDaysInThisMonth();
/**
* Get the number of days in the previous month
*
* @return int
*/
public function getNumberOfDaysInPreviousMonth();
/**
* Get the calendar array
*
* @return array
*/
public function getCalendar();
}